Accordian
Accordion
A visually elegant, customizable card component with optional Chai theme support.
Overview
Accordion can be used for FAQ sections, help sections, and other collapsible content utilities since it is very flexible.
Chai typically combines black tea with aromatic spices like cardamom, cinnamon, cloves, and ginger. It’s also brewed with milk and sugar, giving it a rich and spicy flavor profile.
Green tea is more prominent in East Asian traditions, while chai is more closely associated with Indian culture and uses black tea as a base. However, fusion styles do exist!
Installation
CLI Installation
Make sure ShadCN UI and your custom UI system are set up in your project. Then run:
Manual Installation
📁 1. Folder Structure
Navigate to your project’s src directory and create the following folder structure:
🧩 2. Create the Component File
Inside accordion/, create a new file called:
🧾 3. Paste the Component Code
Paste the following code into Accordion.tsx:
Usage
Import and use the Accordion component like this:
Props
| Prop | Type | Description | Default |
|---|---|---|---|
title | string | Title text shown at the top of the accordion | "Default Question" |
content | string | Content text shown inside the accordion | "Default answer or explanation goes here." |
ChaiTheme | boolean | Whether to apply Chai-themed amber color styles | false |