Basic
flx/accordion-01FreeBlock
Only one section open at a time, type="single" collapsible. The default behavior.
Install it
npx shadcn@latest add https://ui.flexnative.com/r/accordion-01.jsonSource
1import {2 Accordion,3 AccordionContent,4 AccordionItem,5 AccordionTrigger,6} from '@/components/ui/accordion'78export function Accordion01() {9 return (10 <Accordion defaultValue={['item-1']} className="w-full max-w-md">11 <AccordionItem value="item-1">12 <AccordionTrigger>Is it accessible?</AccordionTrigger>13 <AccordionContent>14 Yes. It adheres to the WAI-ARIA design pattern and is fully keyboard15 navigable.16 </AccordionContent>17 </AccordionItem>18 <AccordionItem value="item-2">19 <AccordionTrigger>Is it styled?</AccordionTrigger>20 <AccordionContent>21 Yes. It comes with default styles that match the rest of the22 components.23 </AccordionContent>24 </AccordionItem>25 <AccordionItem value="item-3">26 <AccordionTrigger>Is it animated?</AccordionTrigger>27 <AccordionContent>28 Yes. It is animated by default, but you can disable it if you prefer.29 </AccordionContent>30 </AccordionItem>31 </Accordion>32 )33}
What it pulls in
Other registry items
Files it writes
More from flx
All 450 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Multipleaccordion-02 | flx | Blocks | Free | no deps | |
| With iconsaccordion-03 | flx | Blocks | Free | no deps | |
| FAQaccordion-04 | flx | Blocks | Free | no deps | |
| Separated cardsaccordion-05 | flx | Blocks | Free | no deps | |
| Plus / minus iconaccordion-06 | flx | Blocks | Free | 1 dep | |
| Left chevronaccordion-07 | flx | Blocks | Free | 1 dep | |
| Rich contentaccordion-09 | flx | Blocks | Free | no deps | |
| Disabled itemaccordion-10 | flx | Blocks | Free | no deps |
