• 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

    Portal

    Portal displays content in outside of the DOM hierarchy.

    • npm
    • source
    import { Portal } from '@cerberus/react'

    Usage

    API

    export interface PortalProps {
    container?: RefObject<HTMLElement>;
    disabled?: boolean;
    }
    define function Portal(props: PropsWithChildren<PortalProps>): ReactPortal | null

    Props

    The Portal component accepts the following props:

    NameDefaultDescription
    containerdocument.bodyThe mounted element to place the children contents within.
    disabledfalseDisables the portal from rendering. Perfect for when you need to disabled a child Portal that is rendered within another Portal.

    On this page

    • Edit this page on Github
    Cerberus Design System | Docs