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
| Prop | Type | Default | What it does |
|---|---|---|---|
items required | readonly AccordionItem[] | ||
className | string | ||
defaultValue | string[] | ||
headingLevel | 2 | 3 | 4 | 5 | 6 | 3 | Heading level of the section titles. |
multiple | boolean | false | Let more than one section be open. |
onValueChange | (value: string[]) => void | ||
value | string[] | 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.