Accordion

@sushindustries/ui

details, stacked - every behaviour ships in the element, and items open independently on purpose.

4 min read
View as MarkdownEdit on GitHub

Props

PropTypeDefaultDoes
itemsreadonly AccordionItem[]-Rendered in order and keyed by id. Each opens without closing the others.
defaultOpen?readonly string[][]Ids open on first render.

Notes

defaultOpen only affects the first render - there is no controlled mode, so an id added to the array after mount does not force that row open; each <details> owns its own open state from then on. An id in defaultOpen with no matching item in items is silently ignored.

UsesIconIconThe glyph set, generated from a Markdown table where every drawing carries its reason. One component, typed names, no icon font.@sushindustries/ui · content
Mentioned inCollapsible