shadcn-dashboard
componentaccordion-01source: ok · hit
Accordion-01 - Default
Default accordion component
npx shadcn add "https://shadcndashboard.dev/r/accordion-01.json"free
Interaction
accordion
Tags auto-generated by rules on 9/24/2026 — empty means no evidence, not lack of support.
Dependencies
Bundle weight · lighticonslucide-react
Registry dependencies
accordion
Files1 · source cached 10/9/2026, 5:39:47 AM
src/components/shadcn-dashboard/accordion/accordion-01.tsx
import {
Accordion,
AccordionContent,
AccordionItem,
AccordionTrigger,
} from "@/components/ui/accordion";
import { FileText, Folder, LucideIcon, Settings, Users } from "lucide-react";
const data: {
value: string;
title: string;
subtitle: string;
content: string;
icon: LucideIcon;
}[] = [
{
value: "documents",
title: "Documents",
subtitle: "Manage your files",
content:
"View, upload, and organize all your documents in one place. Keep everything structured and easy to find.",
icon: FileText,
},
{
value: "projects",
title: "Projects",
subtitle: "Organize your work",
content:
"Group related files and tasks into projects to keep your workflow clean and efficient.",
icon: Folder,
},
{
value: "settings",
title: "Settings",
subtitle: "Customize your experience",
content:
"Adjust preferences, update account details, and configure application behavior.",
icon: Settings,
},
{
value: "team",
title: "Team Members",
subtitle: "Manage users and roles",
content:
"Invite new members, assign roles, and control access permissions for your team.",
icon: Users,
},
];
const AccordionDemo = () => (
<div className="flex items-center justify-center max-w-md w-full">
<Accordion className="w-full -space-y-px" defaultValue={[data[0].value]}>
{data.map((item) => {
const Icon = item.icon;
return (
<AccordionItem
key={item.value}
value={item.value}
className=" border bg-background px-4 first:rounded-t-lg last:rounded-b-lg last:border-b"
>
<AccordionTrigger className="hover:no-underline">
<div className="flex items-center gap-3">
<div className="p-2.5 rounded-xl border">
<Icon size={20} className="size-5" />
</div>
<div className="flex flex-col items-start text-left">
<span>{item.title}</span>
<span className="text-sm text-muted-foreground">
{item.subtitle}
</span>
</div>
</div>
</AccordionTrigger>
<AccordionContent className="ps-14">
<p className="text-muted-foreground">{item.content}</p>
</AccordionContent>
</AccordionItem>
);
})}
</Accordion>
</div>
);
export default AccordionDemo;
More from shadcn-dashboard
Accordion-02 - Multi-levelcomponentAccordion-03 - Numbered FAQcomponentAccordion-04 - CardcomponentAccordion-05 - MediacomponentAccordion-06 - Filled TriggercomponentAccordion-07 - Motion ServicescomponentAccount Setting 01 - API Keys & Billing Settingsblock
Browse all components in this library →