Skip to main content
Version: Next

Collapsible API

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

Props​

PropTypeDescription
childrenReact.ReactNode
closeOnEscapeboolean
disabledboolean
headlessboolean
iconPositionCollapsibleIconPosition
onChangeDetail(detail: CollapsibleToggleDetail) => void
onChangeOpen(open: boolean) => void
onToggle(open: boolean) => void
onToggleDetail(detail: CollapsibleToggleDetail) => void
openboolean
radiusnumber | string | 'none' | 'sm' | 'md' | 'lg' | 'full'
readOnlyboolean
sizeCollapsibleSize
stateCollapsibleState
toneCollapsibleTone
variantCollapsibleVariant

Also accepts the standard HTML and React props of the element it renders (className, style, id, aria-*, data-*, event handlers).

Collapsible.Header props​

PropTypeDescription
childrenReact.ReactNode

Also accepts the standard HTML and React props of the element it renders (className, style, id, aria-*, data-*, event handlers).

Collapsible.Caption props​

PropTypeDescription
childrenReact.ReactNode

Also accepts the standard HTML and React props of the element it renders (className, style, id, aria-*, data-*, event handlers).

Collapsible.Meta props​

PropTypeDescription
childrenReact.ReactNode

Also accepts the standard HTML and React props of the element it renders (className, style, id, aria-*, data-*, event handlers).

Collapsible.Content props​

PropTypeDescription
childrenReact.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