Layout
Accordion
A stack of headings that each reveal a section of content. One section is open at a time.
Group: Layout. Exports: Accordion. shadcn/ui equivalent: Accordion (partial parity).
Usage
import { Accordion } from "./halaska-kit";
Accordion props
itemsarray: The entries to render.defaultOpennumber(default -1):
Accessibility
- Each heading is a native button with aria-expanded, so Enter and Space toggle it.
- Closed panels are hidden from assistive technology and from Tab.
- Panels have the region role but are not linked to their buttons with aria-controls or a label.
Known gaps
- Single mode only. Several sections cannot be open together.
- Open state is internal, set once with defaultOpen.
- No disabled items.
- Panels are clipped at 200px tall.
Used in
Halaska UI · Components · Patterns · Screens · Install