Sections
Get Started
Components
- Accordion
- Alert Dialog
- Animated Gradient Text
- Animated Shiny Text
- Avatar
- Badge
- Bento Box
- Bento Grid
- Border Beam
- Breadcrumbs
- Card
- Checkbox
- Custom Cursor
- Dialog
- Glow Border
- Glow Card
- Hyper Text
- Logo Beam
- Marquee
- Number Counter
- Popover
- Ripple Button
- Scroll Area
- Separator
- Shimmer Button
- Shinny Icons
- Tabs
- Terminal
- Text Animate
- Theme Toggler
- Typing Animation
- Word Rotate
"use client"
import {
Accordion,
AccordionContent,
AccordionItem,
AccordionTrigger,
} from "registry/ebonui/ui/accordion"
const items = [
{
value: "item-1",
question: "What payment methods do you accept?",
answer:
"We accept all major credit cards, PayPal, and various other payment methods depending on your location. Please contact our support team for more information on accepted payment methods in your region.",
},
{
value: "item-2",
question: "How does the pricing work for teams?",
answer:
"Our pricing is per user, per month. This means you only pay for the number of team members you have on your account. Discounts are available for larger teams and annual subscriptions.",
},
{
value: "item-3",
question: "Can I change my plan later?",
answer:
"Yes, you can upgrade or downgrade your plan at any time. Changes to your plan will be prorated and reflected in your next billing cycle.",
},
{
value: "item-4",
question: "Is my data secure?",
answer:
"Security is our top priority. We use state-of-the-art encryption and comply with the best industry practices to ensure that your data is stored securely and accessed only by authorized users.",
},
]
export const AccordionDemo = () => {
return (
<div className="container mx-auto px-4">
<div className="mx-auto mt-12 max-w-[648px]">
<Accordion type="single" className="w-full" collapsible>
{items.map(({ value, question, answer }) => (
<AccordionItem
value={value}
key={value}
className="muted-foreground border-b"
>
<AccordionTrigger className="text-md py-7 font-bold hover:underline">
{question}
</AccordionTrigger>
<AccordionContent className="text-sm">{answer}</AccordionContent>
</AccordionItem>
))}
</Accordion>
</div>
</div>
)
}
Installation
pnpm dlx shadcn@latest add https://ebonui.com/r/accordion.json
Usage
import { AccordionDemo } from "@/registry/example/accordion-demo"<div className="relative h-[500px] w-full overflow-hidden">
<AccordionDemo />
</div>Support Ebon UI by giving it a star on GitHub!
A lot of work goes into maintaining and improving Ebon UI. Your stars help show your support and encourage further development.
Star on Github