Accordion
Multi-item collapsible panel group with single or multi expand modes, five visual variants, and full keyboard navigation.
Basic Usage
Basic Accordion
Single-open mode.
import { Accordion } from 'fluxo-ui';
<Accordion items={items} mode="single" defaultOpen={['overview']} />Variants
Variants
Five visual styles for different contexts.
<Accordion items={items} variant="bordered" />
<Accordion items={items} variant="filled" />
<Accordion items={items} variant="separated" />Modes & Chevron Position
Multi Mode & Chevron Position
Multi expand and left chevron.
<Accordion items={items} mode="multi" defaultOpen={['q1', 'q2']} />
<Accordion items={items} mode="single" chevronPosition="left" />Import
import { Accordion } from 'fluxo-ui';
import type { AccordionProps, AccordionItemDef } from 'fluxo-ui';Props
itemsAccordionItemDef[]Array of { id, title, content, icon?, disabled? }.
itemsAccordionItemDef[]Array of { id, title, content, icon?, disabled? }.
mode'single' | 'multi'"'single'"Whether multiple panels can be open at once.
mode'single' | 'multi'"'single'"Whether multiple panels can be open at once.
variant'default' | 'bordered' | 'filled' | 'minimal' | 'separated'"'default'"Visual style.
variant'default' | 'bordered' | 'filled' | 'minimal' | 'separated'"'default'"Visual style.
chevronPosition'left' | 'right'"'right'"Where the expand chevron appears in the header.
chevronPosition'left' | 'right'"'right'"Where the expand chevron appears in the header.
defaultOpenstring[]Initial open item ids (uncontrolled).
defaultOpenstring[]Initial open item ids (uncontrolled).
valuestring[]Controlled open item ids.
valuestring[]Controlled open item ids.
onChange(openIds: string[]) => voidCalled when the set of open items changes.
onChange(openIds: string[]) => voidCalled when the set of open items changes.
ariaLabelstringAccessible name for the accordion if needed.
ariaLabelstringAccessible name for the accordion if needed.
headingLevel1 | 2 | 3 | 4 | 5 | 6"3"Heading level used for each item title (h1-h6) so the page heading outline is correct.
headingLevel1 | 2 | 3 | 4 | 5 | 6"3"Heading level used for each item title (h1-h6) so the page heading outline is correct.
unmountOnCollapseboolean"false"Unmount panel content when collapsed (useful for heavy content that should not stay in the DOM).
unmountOnCollapseboolean"false"Unmount panel content when collapsed (useful for heavy content that should not stay in the DOM).
classNamestringAdditional CSS class for the accordion wrapper.
classNamestringAdditional CSS class for the accordion wrapper.