Docs
Components/Layout/Accordion

Accordion

Collapsible content sections with animated expand/collapse.

s0 add accordion

Usage

S0.Accordion("Is it accessible?") {
    Text("Yes. Built on native SwiftUI disclosure.")
}
S0.Accordion("Open by default", expanded: true) {
    Text("This section starts expanded.")
}

Parameters

NameTypeDefaultDescription
titleStringHeader text for the accordion trigger.
expandedBoolfalseInitial expanded state.
content@ViewBuilder () -> ContentCollapsible body content.