Show

Show displays content in the UI based on a condition

import { Show } from '@cerberus/react'

Usage

API

export interface ShowProps {
when: boolean | null | undefined
fallback?: ReactNode
}
define function Show(props: ShowProps): ReactNode | null

Props

The Show component accepts the following props:

NameDefaultDescription
whenfalseThe condition to evalue for showing the children or fallback.
fallbacknullThe content to render when the condition is false.

On this page