Overview
A single expandable panel inside an Accordion. Reads the accordion context to drive its expanded state and toggle behavior.
Usage
AccordionItem is a compose-only leaf of Accordion. The idiomatic API is Accordion.Item, reached through the parent namespace — see the Accordion README for the composed snippet. The leaf is also a named export of @lostgradient/cinder.
AccordionItem throws if used outside an Accordion — the context lookup is required.
Use the optional meta snippet for status and count badges beside the required string title. The trigger's accessible name includes the title followed by the metadata text. Keep interactive actions outside the trigger, such as in the expanded panel.
When to use
- Rendering one expandable section inside an accordion parent.
- Disabling a single section while leaving siblings interactive via the disabled prop.
- Standing alone outside an accordion — it requires the accordion context to function.
Props
Name | Type | Default | Description |
|---|---|---|---|
id required | text | Unique identifier matched against Accordion's expandedIds. | |
title required | text | Visible header label for the item. | |
meta | snippet | Optional non-interactive content rendered after the title in the trigger. | |
headingLevel | SectionLevel | Heading level for the trigger. Inherits the enclosing Accordion's level when omitted. | |
disabled | boolean | false | When true, the item cannot be toggled. |
style | text | Inline style string applied to the .cinder-accordion-item root. | |
children required | snippet | Panel content rendered when the item is expanded. |