• 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

    Admonition

    An abstracted informational component that can be used to display important messages or warnings to users.

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

    Usage

    The Admonition component is an abstracted informational component that can be used to display important messages or warnings to users. It can be used in various contexts, such as error, success, or informational messages.

    Note

    This is a page admonition that is commonly use to display a page-level informational messages.

    Palette

    The Admonition component can be customized with different color palettes to match the design of your application. You can use: info, action, or any of the state-related palettes.

    Account Error

    There is an error with your account. Please contact support within the next 7 days to keep access.

    Usage

    The Admonition component can be used to display different styles of messages, such as filled (default) or outlined.

    Note

    This is a page admonition that is commonly use to display a page-level informational messages.

    Primitives

    You can utilize the primitive components or the css prop to customize the admonition. Each part forwards ref and allows for a asChild prop.

    ComponentDescription
    AdmonitionRootThe container for the parts
    AdmonitionIndicatorThe icon of the admonition
    AdmonitionContentThe content container of the admonition
    AdmonitionHeadingThe heading of the admonition
    AdmonitionDescriptionThe description body of the admonition

    Cerberus Forever

    President's are temporary, but Cerberus is forever.

    API

    Props

    The Admonition component is an abstraction of the primitives and accepts the following props:

    NameDefaultDescription
    headingThe heading title of the Admonition.
    iconAn alternative icon to display in the Admonition.
    palettepageThe color palette of the Admonition.
    usagefilledThe usage of the Admonition. Can be filled or outlined.

    Parts

    The AdmonitionParts API is an Object containing the full family of components.

    Note

    It is best to only use the AdmonitionParts if you are building a custom solution. Importing Object based components will ship every property it includes into your bundle, regardless if you use it or not.

    NameDescription
    RootThe AdmonitionRoot component which is the container of the family.
    IndicatorThe AdmonitionIndicator component which is the icon of the admonition
    ContentThe AdmonitionContent component which is the container of the admonition
    HeadingThe AdmonitionHeading component which is the heading of the admonition
    DescriptionThe Admonition component which is the description body of the admonition

    The Parts additionally use the following data attributes:

    NameValueDescription
    data-scopeadmonitionThe scope of the components.
    data-partroot, indicator, content, heading, descriptionThe part of the component.

    On this page

    • Edit this page on Github
    Cerberus Design System | Docs