Get Started
Components
- Accordion
- Alert
- Alert Dialog
- Aspect Ratio
- Attachment
- Avatar
- Badge
- Breadcrumb
- Bubble
- Button
- Button Group
- Calendar
- Card
- Carousel
- Chart
- Checkbox
- Collapsible
- Combobox
- Command
- Confirm Dialog
- Container
- Context Menu
- Dialog
- Direction
- Drawer
- Dropdown Menu
- Empty
- Field
- Hover Card
- Input
- Input Group
- Input Number
- Input OTP
- Item
- Kbd
- Label
- Marker
- Menubar
- Message
- Message Scroller
- Native Select
- Navigation Menu
- Pagination
- Popover
- Progress
- Radio Group
- Resizable
- Scroll Area
- Select
- Separator
- Sheet
- Sidebar
- Skeleton
- Slider
- Sonner
- Spinner
- Switch
- Table
- Tabs
- Tailwind Indicator
- Textarea
- Toggle
- Toggle Group
- Tooltip
We offer standard (5-7 days), express (2-3 days), and overnight shipping. Free shipping on international orders.
import {
Accordion,
AccordionContent,
AccordionItem,
AccordionTrigger,Installation
pnpm slabui add accordion
Usage
import {
Accordion,
AccordionContent,
AccordionItem,
AccordionTrigger,
} from "@/components/ui/accordion"<Accordion defaultValue={["item-1"]}>
<AccordionItem value="item-1">
<AccordionTrigger>Is it accessible?</AccordionTrigger>
<AccordionContent>
Yes. It adheres to the WAI-ARIA design pattern.
</AccordionContent>
</AccordionItem>
</Accordion>Composition
Use the following composition to build an Accordion:
Accordion
โโโ AccordionItem
โ โโโ AccordionTrigger
โ โโโ AccordionContent
โโโ AccordionItem
โโโ AccordionTrigger
โโโ AccordionContentBasic
A basic accordion that shows one item at a time. The first item is open by default.
Click on 'Forgot Password' on the login page, enter your email address, and we'll send you a link to reset your password. The link will expire in 24 hours.
import {
Accordion,
AccordionContent,
AccordionItem,
AccordionTrigger,Multiple
Use the multiple prop to allow multiple items to be open at the same time.
Manage how you receive notifications. You can enable email alerts for updates or push notifications for mobile devices.
import {
Accordion,
AccordionContent,
AccordionItem,
AccordionTrigger,Disabled
Use the disabled prop on AccordionItem to disable individual items.
import {
Accordion,
AccordionContent,
AccordionItem,
AccordionTrigger,Borders
Add border to the Accordion and border-b last:border-b-0 to the AccordionItem to add borders to the items.
We offer monthly and annual subscription plans. Billing is charged at the beginning of each cycle, and you can cancel anytime. All plans include automatic backups, 24/7 support, and unlimited team members.
import {
Accordion,
AccordionContent,
AccordionItem,
AccordionTrigger,Card
Wrap the Accordion in a Card component.
Subscription & Billing
Common questions about your account, plans, payments and cancellations.
We offer three subscription tiers: Starter ($9/month), Professional ($29/month), and Enterprise ($99/month). Each plan includes increasing storage limits, API access, priority support, and team collaboration features.
import {
Accordion,
AccordionContent,
AccordionItem,
AccordionTrigger,API Reference
See the Base UI documentation for more information.