Collapsible API
import { Collapsible } from '@editora/ui-react';
Props
| Prop | Type | Description |
|---|---|---|
children | React.ReactNode | |
closeOnEscape | boolean | |
disabled | boolean | |
headless | boolean | |
iconPosition | CollapsibleIconPosition | |
onChangeDetail | (detail: CollapsibleToggleDetail) => void | |
onChangeOpen | (open: boolean) => void | |
onToggle | (open: boolean) => void | |
onToggleDetail | (detail: CollapsibleToggleDetail) => void | |
open | boolean | |
radius | number | string | 'none' | 'sm' | 'md' | 'lg' | 'full' | |
readOnly | boolean | |
size | CollapsibleSize | |
state | CollapsibleState | |
tone | CollapsibleTone | |
variant | CollapsibleVariant |
Also accepts the standard HTML and React props of the element it renders (className, style, id, aria-*, data-*, event handlers).
Collapsible.Header props
| Prop | Type | Description |
|---|---|---|
children | React.ReactNode |
Also accepts the standard HTML and React props of the element it renders (className, style, id, aria-*, data-*, event handlers).
Collapsible.Caption props
| Prop | Type | Description |
|---|---|---|
children | React.ReactNode |
Also accepts the standard HTML and React props of the element it renders (className, style, id, aria-*, data-*, event handlers).
Collapsible.Meta props
| Prop | Type | Description |
|---|---|---|
children | React.ReactNode |
Also accepts the standard HTML and React props of the element it renders (className, style, id, aria-*, data-*, event handlers).
Collapsible.Content props
| Prop | Type | Description |
|---|---|---|
children | React.ReactNode |
Also accepts the standard HTML and React props of the element it renders (className, style, id, aria-*, data-*, event handlers).
Element: <ui-collapsible>
Collapsible renders the ui-collapsible custom element from @editora/ui-core, which can also be used without React.
Attributes: close-on-escape, disabled, headless, icon-position, open, readonly, size, state, tone, variant
Events: change, toggle, ui-change, ui-toggle