Accordion API
import { Accordion } from '@editora/ui-react';
Props
| Prop | Type | Description |
|---|---|---|
collapsible | boolean | |
elevation | 'default' | 'none' | 'low' | 'high' | |
indicator | 'line' | 'none' | |
multiple | boolean | |
onChangeOpen | (open: OpenValue) => void | |
onToggle | (open: OpenValue) => void | |
open | OpenValue | |
radius | number | string | |
shape | 'default' | 'square' | 'pill' | |
size | 'sm' | 'md' | 'lg' | '1' | '2' | '3' | |
tone | 'neutral' | 'info' | 'success' | 'warning' | 'danger' | |
variant | 'surface' | 'outline' | 'soft' | 'solid' | 'ghost' | 'glass' |
Also accepts the standard HTML and React props of the element it renders (className, style, id, aria-*, data-*, event handlers).
Accordion.Item props
| Prop | Type | Description |
|---|---|---|
badge | string | |
description | string | |
disabled | boolean |
Also accepts the standard HTML and React props of the element it renders (className, style, id, aria-*, data-*, event handlers).
Accordion.Trigger props
Also accepts the standard HTML and React props of the element it renders (className, style, id, aria-*, data-*, event handlers).
Accordion.Panel props
Also accepts the standard HTML and React props of the element it renders (className, style, id, aria-*, data-*, event handlers).
Element: <ui-accordion>
Accordion renders the ui-accordion custom element from @editora/ui-core, which can also be used without React.
Attributes: collapsible, elevation, headless, indicator, multiple, open, radius, shape, size, tone, variant
Events: change, toggle