Menu
View as Markdown

Components

Accordion

Live compiled demo for the Accordion component contract.

shipping
data-stateopen, closed, disabled
keyboardNative button activation opens an item; group keyboard maps are primitive-owned
change reasonstrigger-click, programmatic

Usage

Vertically stacked headers that each expand to reveal a panel, with single- or multi-open behavior.

  • Import the versioned component from @kovojs/ui/accordion.
  • Copy the source into your app with kovo add accordion when product code should own the implementation.

Source

  • Package source: packages/ui/src/accordion.tsx
  • Gallery fixture: examples/gallery/src/demo-fixtures.tsx
  • Interactive demo: examples/gallery/src/interactive/accordion-demo.tsx

Behavior contract

The rendered fixture above includes the component contract table. Interactive pages compile the authored TSX demo and then lift the same contract table from the static fixture, so the visible behavior and documented ARIA/data-state surface stay together.