Skip to main content
Version: Next

Accordion API

import { Accordion } from '@editora/ui-react';

Props​

PropTypeDescription
collapsibleboolean
elevation'default' | 'none' | 'low' | 'high'
indicator'line' | 'none'
multipleboolean
onChangeOpen(open: OpenValue) => void
onToggle(open: OpenValue) => void
openOpenValue
radiusnumber | 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​

PropTypeDescription
badgestring
descriptionstring
disabledboolean

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