Accordion
Accordion groups expandable panels for FAQs, settings sections, or nested detail.
Bind open_items to a RwSignal<HashSet<String>> of open panel ids. Set multiple to allow several panels open at once and collapsible so the last open panel can close. Each AccordionItem needs a distinct value and an AccordionHeader slot. Orbital tracks open state in one parent set — not separate per-panel booleans.
- Group related content that users expand on demand — policy sections, advanced settings, nested detail
- Single open panel by default; enable
multiplewhen users compare sections side by side - For a single expand/collapse region without a shared header list, compose a one-off panel instead
- Create
open_itemsasRwSignal::new(HashSet::new())(or seed with initial ids). - Pass the signal to
Accordionand give eachAccordionItema matchingvalue. - Put the clickable label in
AccordionHeader; panel body is the item's remaining children. - Optional:
multiple=truefor several open panels;collapsible=trueto close the last panel. - Optional: pass
motion: MotionSlotonAccordionItemto customize expand/collapse transitions (defaults to theme motion).
Parent-owned open_items set with one panel expanded. Bind the signal at your page root so URL or save logic can sync open sections.
Panel content
Accordion that allows several panels to stay expanded with multiple=true. Choose this when users compare content across sections or need several groups visible at once.
Single-section accordion where the open panel can be collapsed entirely via collapsible=true. Use when every section should be closable, including the last remaining panel.
Can close last panel
Accordion headers that respond to keyboard activation (Enter/Space) for expand and collapse. Pair with collapsible=true when focus-driven workflows must toggle panels without a mouse.
Accordion styled with Orbital theme tokens on headers and panels. Use as a baseline when matching accordion chrome to surrounding surfaces and typography.
Panel body