Accordion API
Accordion is a client-only single-open disclosure component for grouped navigation, FAQs, and docs panels.
Preview components
Open the component docs to see examples, combinations, and usage patterns built on top of this API.
- AccordionDisclosure examples and docs/sidebar usage.
Preview
Axonyx keeps static UI CSS-first and only hydrates interaction islands.
Import
import { Accordion, AccordionItem } from "@axonyx/react/client";Props
| Prop | Type | Default | Description |
|---|---|---|---|
| defaultValue | string | null | null | Item value opened initially. |
| value | string | required on AccordionItem | Stable item identifier. |
| title | ReactNode | required on AccordionItem | Trigger content. |
CSS contract
.ax-accordion .ax-accordion__item .ax-accordion__trigger .ax-accordion__content [data-open]
Single-open by design
Opening one item closes the previous one, which makes it useful for sidebars and dense docs navigation.