ki-accordion
@kimen/elements/ki-accordion- Source
- Agent reference
Place ki-details members directly inside the accordion.
Use exclusive to close the open panel when another member opens. Each
member manages its own focus and emits ki-toggle when its native state changes.
<ki-accordion exclusive> <ki-details open summary="Who can see my workspace?"> Only people you invite can see it. </ki-details> <ki-details summary="Can I export my data?"> Open Settings, then select Data and Export. </ki-details></ki-accordion>For a script-free group, serve native details markup and use a shared
name for the group.
API reference
When to use: group related FAQ answers, settings or expandable sections. Enable exclusive when readers benefit from one open section at a time.
When not to use: switch between views or make the panels advance a workflow.
Properties & attributes
| Attribute | Property | Type | Default | Description |
|---|---|---|---|---|
exclusive | exclusive | boolean | false | Whether the accordion allows at most one direct member to be open. |
Slots
| Slot | Description |
|---|---|
| (default) | Direct ki-details members in reading order. |
CSS parts
| Part | Description |
|---|---|
group | The frame around the disclosure rows. |
CSS custom properties
The public styling contract of ki-accordion: reassign these tokens at :root or on a subtree — never override internals.
| Token | Description |
|---|---|
--ki-accordion-divider-width | Width of the separator between accordion rows. |
--ki-details-border | Color of the disclosure frame and accordion separators. |
--ki-details-border-width | Width of the disclosure or accordion frame. |
--ki-details-radius | Corners of a standalone disclosure or the accordion frame. |
--ki-typography-family-body | semantic font family for typography family body. |