# Cerberus UI Platform Documentation > Index of all docs: /llms.txt --- ## accordion --- title: Accordion description: A way to show and hide information by sections. npm: '@cerberus-design/react' source: 'components/accordion' recipe: 'slots/accordion.ts' ark: 'accordion' --- ```tsx // Source available in static configuration: {DEMOS.meta} ``` ## Usage The Accordion component is a controlled abstraction of the primitive components that can be used to show or hide content. It can be used in a group with other accordion items to allow for multiple selections. ```tsx import { Accordion, AccordionItemGroup, For, Show, } from '@cerberus-design/react' export function BasicDemo() { return ( {(item) => ( }> {item.content} )} ) } function FallbackContent() { return ( A fiery cerberus ) } ``` ## Indicator Position The `AccordionItemGroup` component supports two indicator positions: `start` and `end`. This changes the position of the icon indicator displayed. ```tsx import { Accordion, AccordionItemGroup, For, Show, } from '@cerberus-design/react' export function IndicatorDemo() { return ( {(item) => ( {item.content} )} ) } ``` ## Sizes The `Accordion` component supports two sizes: `sm` and `lg`. This changes the size of the icon indicator displayed. ```tsx import { Accordion, AccordionItemGroup, For, Show, } from '@cerberus-design/react' export function SizeDemo() { return ( {(item) => ( {item.content} )} ) } ``` ## Customizing You can customize the Accordion using style props and data selectors. ```tsx export function CustomDemo() { return ( πŸ”₯ Cerberus Cerberus is the three-headed dog that guards the gates of the Underworld and our sweet baby boi protecting the integrity of your design system. ) } ``` ## Primitives The layers of the Accordion which can be used to create a fully custom solution. | Component | Description | | ---------------------- | ------------------------------------------------------------------ | | AccordionRoot | The main container for the accordion items. | | AccordionItem | Represents a single item within the accordion. | | AccordionItemTrigger | The trigger element that toggles the visibility of the content. | | AccordionItemContent | The content that is shown or hidden when the trigger is activated. | | AccordionItemIndicator | An optional indicator to show the state of the accordion item. | ### Data Attributes The primitives additionally use the following data attributes for custom styling: | Name | Value | Description | | ------------ | ---------------- | -------------------------------------- | | `data-scope` | `accordion` | The scope of the components. | | `data-part` | `root` | The root layer of the scope. | | `data-part` | `item` | The item layer of the scope. | | `data-part` | `item-trigger` | The item trigger layer of the scope. | | `data-part` | `item-content` | The item content layer of the scope. | | `data-part` | `item-indicator` | The item indicator layer of the scope. | ## API ### Accordion The `Accordion` component is an abstraction of the primitives and accepts the following props: | Name | Default | Description | | ---- | ------- | ------------------------------- | | size | `lg` | The size of the accordion item. | The Accordion is an abstraction of the [Root component](https://ark-ui.com/react/docs/components/accordion#api-reference). ### AccordionItemGroup The `AccordionItemGroup` component is an abstraction of the primitives and accepts the following props: | Name | Default | Description | | ----------------- | ------- | ------------------------------------------------ | | heading | | The heading of the accordion item. | | value | | The value of the accordion item. Must be unique. | | indicatorPosition | `end` | The position of the indicator. | The AccordionItemGroup is an abstraction of the [Item component](https://ark-ui.com/react/docs/components/accordion#api-reference). ### Parts The `AccordionParts` API is an Object containing the full family of components. > **Note:** It is best to only use the AccordionParts 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. | Name | Description | | ------------- | ------------------------------------------------------------------------------------------------------ | | Root | The `AccordionRoot` component which is the Provider for the family. | | Item | The `AccordionItem` component which displays the item. | | ItemTrigger | The `AccordionItemTrigger` component which is the visual title that triggers the content to open. | | ItemContent | The `AccordionItemContent` component which displays the content that is revealed from the ItemTrigger. | | ItemIndicator | The `AccordionItemIndicator` component which displays the indicator (chevron) icon. | --- ## admonition --- title: 'Admonition' description: 'An abstracted informational component that can be used to display important messages or warnings to users.' npm: '@cerberus-design/react' source: 'components/admonition' recipe: 'slots/admonition.ts' --- ```tsx // Source available in static configuration: {DEMOS.meta} ``` ## 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. ```tsx export function BasicDemo() { return ( This is a note admonition that is commonly use to display a page-level informational message. ) } ``` ## 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`. ```tsx export function PaletteDemo() { const palettes: AdmonitionProps['palette'][] = ['page', 'info', 'success', 'warning', 'danger'] return ( {(palette) => ( This is a {palette} admonition. )} ) } ``` ## Usage Use the `usage` prop to display the admonition in a different style. The options are `filled` (default) and `outlined`. ```tsx export function UsageDemo() { const palettes: AdmonitionProps['palette'][] = ['page', 'info', 'success', 'warning', 'danger'] return ( {(palette) => ( This is a {palette} admonition. )} ) } ``` ## Customizing You can customize the Admonition any way you like with style props and data-selectors. ```tsx export function CustomDemo() { return ( Cerberus Forever President's are temporary, but Cerberus is forever. ) } ``` ## Primitives You can utilize the primitive components or style props to customize the admonition. | Component | Description | | --------------------- | --------------------------------------- | | AdmonitionRoot | The container for the parts | | AdmonitionIndicator | The icon of the admonition | | AdmonitionContent | The content container of the admonition | | AdmonitionHeading | The heading of the admonition | | AdmonitionDescription | The description body of the admonition | ### Data Attributes The primitives additionally use the following data attributes for custom styling: | Name | Value | Description | | ------------ | ------------- | ---------------------------- | | `data-scope` | `admonition` | The scope of the components. | | `data-part` | `root` | The part of the component. | | `data-part` | `indicator` | The part of the component. | | `data-part` | `content` | The part of the component. | | `data-part` | `heading` | The part of the component. | | `data-part` | `description` | The part of the component. | ## API ### Props The `Admonition` component is an abstraction of the primitives and accepts the following props: | Name | Default | Description | | ------- | -------- | ----------------------------------------------------------- | | heading | | The heading title of the Admonition. | | icon | | An alternative icon to display in the Admonition. | | palette | `page` | The color palette of the Admonition. | | usage | `filled` | The 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. | Name | Description | | ----------- | --------------------------------------------------------------------------- | | Root | The `AdmonitionRoot` component which is the container of the family. | | Indicator | The `AdmonitionIndicator` component which is the icon of the admonition. | | Content | The `AdmonitionContent` component which is the container of the admonition. | | Heading | The `AdmonitionHeading` component which is the heading of the admonition. | | Description | The `Admonition` component which is the description body of the admonition. | --- ## aspect-ratio --- title: Aspect Ratio description: Used to embed responsive videos and maps, etc. panda: https://panda-css.com/docs/concepts/patterns#aspect-ratio --- ```tsx // Source available in static configuration: {DEMOS.meta} ``` ## Usage ```tsx export function BasicDemo() { return (