Accordion

A vertically stacked set of interactive headings that reveal sections of content.

Installation

Import the component from the passport-ui package.

components/example.tsx
1import {
2 Accordion,
3 AccordionContent,
4 AccordionItem,
5 AccordionTrigger,
6} from "passport-ui";

Usage

Basic example showing how to use the component.

components/example.tsx
1<Accordion type="single" collapsible className="w-sm">
2 <AccordionItem value="item-1">
3 <AccordionTrigger>Product Information</AccordionTrigger>
4 <AccordionContent className="flex flex-col gap-4 text-balance">
5 <p>
6 Our flagship product combines modern technology with sleek design.
7 Built with premium materials, it offers unparalleled performance and
8 reliability.
9 </p>
10 </AccordionContent>
11 </AccordionItem>
12 <AccordionItem value="item-2">
13 <AccordionTrigger>Shipping Details</AccordionTrigger>
14 <AccordionContent className="flex flex-col gap-4 text-balance">
15 <p>
16 We offer worldwide shipping through trusted courier partners.
17 Standard delivery takes 3-5 business days.
18 </p>
19 </AccordionContent>
20 </AccordionItem>
21</Accordion>

Additional resources

Documentation and examples are available in Storybook.