DocsBlog

Get Started

Components

Data Grid

Signals

Styling

Theming

↑↓Navigate
↵Select
EscClose
  • 1.8.0

  • Day

    Night

    Preview

    Switch mode
  • cerberus

    acheron

    elysium

    oceanus

Get Started
Components
Data Grid
Signals
Styling
Theming

Concepts

OverviewCompositionCerberus ContextTesting

Layout

Aspect RatioBleedBoxCenterContainerContainer QueryDividerFlexFloatGridGroupLink OverlayScrollableStackWrap

Components

AccordionAdmonitionAvatarButtonCarouselCheckboxClipboardCollapsibleComboboxConfirm ModalCTA ModalDate PickerDialogFieldFieldsetFile UploaderIconButtonInputLoading StatesMarqueeMenuNotificationsNumber InputPaginationPin InputPopoverProgress IndicatorsPrompt ModalRadioRatingSelectSliderSplit ButtonSwitchTableTabsTagTextTextareaToggleTooltip

Utilities

Client OnlyDownload TriggerEnvironmentFeature FlagsFocus TrapForFormat ByteFormat NumberFormat Relative TimeFormat Relative TimeFrameHighlightJSON Tree ViewLocalePortalPresenceShowSwapsplitPropsTheme

Admonition

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

  • npm
  • source
  • recipe
View as Markdown
Open this page in Markdown
Anthropic
Open in Claude
Ask questions about this page
OpenAI
Open in ChatGPT
Ask questions about this page

Import

import { Admonition } from '@cerberus/react'

Usage

The Admonition component is used to display static messagesto users. It can be used in various contexts, such as error, success, or informational messages.

Loading example...

Palette

The Admonition component can be customized with different color palettes to match the design of your application. You can use any of the state-related palettes along with page.

Loading example...

Usage

Use the usage prop to display the admonition in a different style. The options are filled (default) and outlined.

Loading example...

Customizing

You can customize the Admonition any way you like with style props and data-selectors.

Loading example...

Primitives

You can utilize the primitive components or style props to customize the admonition.

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

Data Attributes

The primitives additionally use the following data attributes for custom styling:

NameValueDescription
data-scopeadmonitionThe scope of the components.
data-partrootThe part of the component.
data-partindicatorThe part of the component.
data-partcontentThe part of the component.
data-partheadingThe part of the component.
data-partdescriptionThe part of the component.

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.

On this page

  • Import
  • Usage
  • Palette
  • Usage
  • Customizing
  • Primitives
    • Data Attributes
  • API
    • Props
    • Parts
Edit this page on Github

Note

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

Heading

This is a page admonition.

Heading

This is a info admonition.

Heading

This is a success admonition.

Heading

This is a warning admonition.

Heading

This is a danger admonition.

Heading

This is a filled admonition.

Heading

This is a outlined admonition.

Cerberus Forever

President's are temporary, but Cerberus is forever.