byronwade/ui
Application UI

Data display · Application UI

Accordion

A vertically stacked set of collapsible sections, each with a trigger header that toggles its content panel open or closed.

Feature showcase

Installation

Features

  • 1 example

    Default.

API

Props

PropTypeDefaultDescription
valueany[]-Controlled array of expanded item values.
defaultValueany[]-Uncontrolled initial array of expanded item values.
multiplebooleanfalseWhether multiple items can be open at the same time.
disabledbooleanfalseWhether the accordion ignores user interaction.
onValueChange(value: any[], eventDetails: AccordionRootChangeEventDetails) => void-Called when an item is expanded or collapsed.
loopFocusbooleantrueWhether keyboard focus loops back to the first item when the end is reached.
keepMountedbooleanfalseWhether to keep panel content in the DOM while closed.
hiddenUntilFoundbooleanfalseUses hidden="until-found" so browser page search can find and expand panels.
orientation'horizontal' | 'vertical''vertical'Visual orientation that controls which arrow keys move focus.
classNamestring-Additional CSS class names applied to the root element.

Source and related

FilePath
Componentregistry/ui/accordion.tsx
Default examplecontent/examples/accordion/default.tsx