UI kit reference
components/Accordion
import { … } from 'zidane-ui'ui/src/components/Accordion.tsx
Components#
AccordionComponent#
Renders sections with headers that open and close them. Several can be open at once.
function Accordion(props: AccordionProps): ElementParameters
| Name | Type | Description |
|---|---|---|
| props | AccordionProps |
Returns
ElementProps
| Name | Type | Description |
|---|---|---|
| className? | string | Extra classes on the root element. |
| items | readonly AccordionItem[] | The sections, in order. |
| style? | CSSProperties | Inline styles on the root element. |
Interfaces#
AccordionItemInterface#
One section of an Accordion.
interface AccordionItemProperties
| Name | Type | Description |
|---|---|---|
| content | ReactNode | The body the section shows when open. |
| defaultOpen? | boolean | Open at first. |
| id | string | Stable id, unique among the items. |
| title | ReactNode | The header text. |
AccordionPropsInterface#
Props for Accordion.
interface AccordionPropsProperties
| Name | Type | Description |
|---|---|---|
| className? | string | Extra classes on the root element. |
| items | readonly AccordionItem[] | The sections, in order. |
| style? | CSSProperties | Inline styles on the root element. |