Box Accordion
shadcn-ui-blocks/accordion-03FreeComponent
A box styled accordion
Install it
npx shadcn@latest add https://shadcnui-blocks.com/r/accordion-03.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 AccordionBoxDemo() {27 return (28 <Accordion className="my-4 w-full max-w-lg" collapsible type="single">29 {items.map(({ title, content }, index) => (30 <AccordionItem31 className="border not-last:border-b-0 px-4 first:rounded-t-md last:rounded-b-md last:border-b"32 key={index}33 value={`item-${index}`}34 >35 <AccordionTrigger>{title}</AccordionTrigger>36 <AccordionContent>{content}</AccordionContent>37 </AccordionItem>38 ))}39 </Accordion>40 );41}
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 | |
| Contained Accordionaccordion-04 | Shadcn UI Blocks | Components | Free | no deps | |
| Box Contained Accordionaccordion-05 | Shadcn UI Blocks | Components | Free | no deps | |
| Tabs Accordionaccordion-06 | 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 |
