Argent

Accordion

Sections that open and close.

import { Accordion } from '@rajatweb/argent'

<Accordion
  items={[
    { value: 'time', title: 'How long does it take?', content: 'Two to four weeks.' },
  ]}
/>

Props

PropTypeDefaultWhat it does
items requiredreadonly AccordionItem[]
classNamestring
defaultValuestring[]
headingLevel2 | 3 | 4 | 5 | 63Heading level of the section titles.
multiplebooleanfalseLet more than one section be open.
onValueChange(value: string[]) => void
valuestring[]Values of the open sections.

Accessibility

  • Titles are real headings on the web. Set `headingLevel` to fit the page.

Do

  • Put what most people need outside it.

Don’t

  • Hide everything.