Stylish Accordion
A vertically stacked set of collapsible sections — the web "accordion" pattern from shadcn/ui, MUI, and Chakra UI.
At most one section is expanded at a time. The component is fully hoisted when onExpandedChange is provided; otherwise it manages the expanded index internally.
Parameters
The sections to display, in order.
Modifier applied to the root column.
Index of the currently expanded section, or null to collapse all. When onExpandedChange is null, this is the initial value and the component manages its own state.
Optional callback invoked with the newly expanded index (or null when a section is collapsed). When null, the component manages its own expansion state.
Gap between adjacent sections. Defaults to StylishTheme.dimensions.connectedSpacing (3 dp), keeping the sections visually grouped.
Corner shape of each section surface. Defaults to RoundedCornerShape with DefaultStylishDimensions.connectedCornerRadius.
Background of each section. Defaults to MaterialTheme.colorScheme.surfaceContainerHigh.
Foreground color of the section content.
Typography of the section headers. Defaults to MaterialTheme.typography.titleMedium.
Maximum lines for StylishAccordionItem.title.
Overflow strategy for the title.
When false, no section can be toggled.