Skip to content

Accordion

Props

API reference for Accordion. For usage examples, see the React tab.

Accordion.Root

NameTypeDefault
allowsMultipleExpandedboolean

Whether multiple items can be expanded at the same time.

childrenChildrenOrFunction<DisclosureGroupRenderProps>

The children of the component. A function may be provided to alter the children based on component state.

defaultExpandedKeysIterable<Key>

The initial expanded keys in the group (uncontrolled).

expandedKeysIterable<Key>

The currently expanded keys in the group (controlled).

isDisabledboolean

Whether all items are disabled.

isElevatedbooleanfalse

Elevates the accordion, giving it a raised appearance.

panelPaddingnumber

Accordion.Item

NameTypeDefault
childrenChildrenOrFunction<DisclosureRenderProps>

The children of the component. A function may be provided to alter the children based on component state.

defaultExpandedboolean

Whether the disclosure is expanded by default (uncontrolled).

elevatedboolean

Renders the elevated variant of the accordion item

isDisabledboolean

Whether the disclosure is disabled.

isExpandedboolean

Whether the disclosure is expanded (controlled).

Accordion.Panel

NameTypeDefault
children (required)ReactNode

The children of the component.

labelReactNode

The content to display as the label.

labelElementTypeElementType'label'

The HTML element used to render the label, e.g. 'label', or 'span'.

paddingnumber

Accordion.Trigger

NameTypeDefault
childrenReactNode

The children of the component. A function may be provided to alter the children based on component state.

isDisabledboolean

Whether the button is disabled.

isPendingboolean

Whether the button is in a pending state. This disables press and hover events while retaining focusability, and announces the pending state to screen readers.