Tabs Accordion
shadcn-ui-blocks/accordion-06FreeComponent
A tabs-styled accordion component
Install it
npx shadcn@latest add https://shadcnui-blocks.com/r/accordion-06.jsonSource
1import {2 Accordion,3 AccordionContent,4 AccordionItem,5 AccordionTrigger,6} from "@/registry/ui/accordion";78const items = [9 {10 title: "Can I change or cancel my order after placing it?",11 content:12 "Yes, you can change or cancel your order within 1 hour of placement by visiting your account page or contacting our support team. After that, orders may already be processed for shipping.",13 },14 {15 title: "How long does shipping usually take?",16 content:17 "Domestic shipping typically takes 3-5 business days, while international orders may take up to 2-3 weeks depending on your location and customs processing times.",18 },19 {20 title: "What is your return policy?",21 content:22 "We offer a 30-day return policy for most products. Items must be unused and in their original packaging. To initiate a return, simply contact our support with your order details.",23 },24];2526export default function AccordionTabsDemo() {27 return (28 <Accordion29 className="my-4 w-full max-w-lg space-y-2"30 collapsible31 defaultValue="item-0"32 type="single"33 >34 {items.map(({ title, content }, index) => (35 <AccordionItem36 className="rounded-md border-none px-4 data-[state=open]:bg-secondary"37 key={index}38 value={`item-${index}`}39 >40 <AccordionTrigger className="data-[state=closed]:py-2">41 {title}42 </AccordionTrigger>43 <AccordionContent>{content}</AccordionContent>44 </AccordionItem>45 ))}46 </Accordion>47 );48}
What it pulls in
Other registry items
Files it writes
More from Shadcn UI Blocks
All 542 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Default Accordionaccordion-01 | Shadcn UI Blocks | Components | Free | no deps | |
| Outline Accordionaccordion-02 | Shadcn UI Blocks | Components | Free | no deps | |
| Box Accordionaccordion-03 | Shadcn UI Blocks | Components | Free | no deps | |
| Contained Accordionaccordion-04 | Shadcn UI Blocks | Components | Free | no deps | |
| Box Contained Accordionaccordion-05 | Shadcn UI Blocks | Components | Free | no deps | |
| Highlight Active Item Accordionaccordion-07 | Shadcn UI Blocks | Components | Free | no deps | |
| Multiple Expanded at a time Accordionaccordion-08 | Shadcn UI Blocks | Components | Free | no deps | |
| Expand Icon Accordionaccordion-09 | Shadcn UI Blocks | Components | Free | 2 deps |
