Velocity X Components

Core UI

Accordion / FAQ List

Expand/collapse FAQ list with measured-height animation, single or multi-open modes, and arrow-key navigation between headers.

Free MIT licensed. Install it with the CLI — no account, no key.
bash
$ velocityx add accordion-faq

Built for react. Needs react already installed as a peer dependency. An Astro-only project needs @astrojs/react wired up first — this won't run on its own in plain Astro.

Full docs for Accordion / FAQ List →

react v1.0.0 react
Accordion / FAQ List

No — every component is zero-dependency and imports only react/react-dom.

Yes, via the existing .dark class strategy — no second theming system.

Yes — arrow keys move between headers, Enter/Space toggles.

Props

NameTypeRequiredDefaultDescription
items{ id, question, answer: ReactNode }[]No[]
allowMultipleboolean (Nofalse
defaultOpenIdsstring[]No[]

File this creates

The CLI writes this path into your project, relative to its root — nothing else moves.

text
components/velocity/accordion-faq/Accordion.jsx

Using the Accordion / FAQ List component

Install it with velocityx add accordion-faq. The CLI writes the source straight into your project — no runtime dependency, no registry lock-in, and it themes itself from the same primary-*/accent-* scale as the rest of the library.

More from Core UI.