Concepts
OverviewCompositionTestingLayout
Aspect RatioBleedBoxCenterContainerDividerFlexFloatGridLink OverlayScrollableStackWrapComponents
AccordionAdmonitionAvatarButtonCarouselCheckboxClipboardCollapsibleComboboxConfirm ModalCTAModalDate PickerDialogFieldFieldsetFile UploaderIcon ButtonInputLoading StatesMenuNotificationsNumber InputPin InputProgressPrompt ModalRadioRatingSelectSplit ButtonSwitchTableTabsTagTextTextareaToggleTooltipUtilities
Feature FlagsForLocal StoragePortalShowsplitPropsThemeimport { Show } from '@cerberus/react'Usage
The Show component takes a when prop that determines whether the children or the fallback content should be rendered. If when is true, the children are rendered. If when is false, the fallback content is rendered.
You are not allowed to enter!
API
export interface ShowProps { when: boolean | null | undefined fallback?: ReactNode}
define function Show(props: ShowProps): ReactNode | nullProps
The Show component accepts the following props:
| Name | Default | Description |
|---|---|---|
| when | false | The condition to evalue for showing the children or fallback. |
| fallback | null | The content to render when the condition is false. |
On this page