• Docs
  • Blog
    • 0.24.0

    • Switch to dark mode
    Get Started
    Components
    Styling
    Theming

    Concepts

    OverviewCompositionTesting

    Layout

    Aspect RatioBleedBoxCenterContainerDividerFlexFloatGridLink OverlayScrollableStackWrap

    Components

    AccordionAdmonitionAvatarButtonCarouselCheckboxClipboardCollapsibleComboboxConfirm ModalCTAModalDate PickerDialogFieldFieldsetFile UploaderIcon ButtonInputLoading StatesMenuNotificationsNumber InputPin InputProgressPrompt ModalRadioRatingSelectSplit ButtonSwitchTableTabsTagTextTextareaToggleTooltip

    Utilities

    Feature FlagsForLocal StoragePortalShowsplitPropsTheme

    Feature Flags

    Feature Flags display or hide content in the UI.

    • npm
    • source
    import { FeatureFlags, FeatureFlag } from '@cerberus/react'

    When to use

    When you need render a component based on if it should be enabled or not.

    Usage

    This is a visible feature

    API

    export interface FeatureFlagsProviderValue {
    flags: Record<string, boolean>
    }
    export interface FeatureFlagProps {
    // A unique key of the flags data passed into the provider.
    flag: string
    }
    define function FeatureFlag(props: PropsWithChildren<FeatureFlagProps>): JSX.Element

    Props

    The FeatureFlag component accepts the following props:

    NameDefaultDescription
    flagnullA unique key of the flags data passed into the provider.

    On this page

    • Edit this page on Github
    Cerberus Design System | Docs