Skip to content
Kimenpre-v1documentation home
Color scheme

ki-accordion

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

AttributePropertyTypeDefaultDescription
exclusiveexclusivebooleanfalseWhether the accordion allows at most one direct member to be open.

Slots

SlotDescription
(default)Direct ki-details members in reading order.

CSS parts

PartDescription
groupThe 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.

TokenDescription
--ki-accordion-divider-widthWidth of the separator between accordion rows.
--ki-details-borderColor of the disclosure frame and accordion separators.
--ki-details-border-widthWidth of the disclosure or accordion frame.
--ki-details-radiusCorners of a standalone disclosure or the accordion frame.
--ki-typography-family-bodysemantic font family for typography family body.

Open Details in Storybook