Expandable sections. With status and badge it becomes a setup checklist; AccordionGroup adds a heading.
Default
A bordered stack of questions; give items the same name so only one opens at a time.
Can clients see our internal comments?
How do I send a proposal for approval?
Who can see invoice totals?
Installation
Copies the component into src/design-system/ as your own source, with only the files it needs.
npx avesk-ui@latest add accordionBrings the 3 files it builds on (tooltip.tsx, floating.tsx, glyph.tsx). The first time, it also adds the tokens and the cn() helper, imports the tokens in globals.css and installs clsx and tailwind-merge. Files already in your project are kept unless you add --force.
Import
Lives in src/design-system/components/accordion.tsx.
import { Accordion, AccordionGroup, AccordionItem } from "@/design-system/components/accordion";Usage
<Accordion size="lg">
<AccordionItem status="complete" title="Add your first client" badge={<Badge tone="emerald">Ready</Badge>}>…</AccordionItem>
</Accordion>Examples
Card variant
Each item is its own card, with a short description visible while closed.
Brand refresh for DenzingLogo, colour palette and type system
Website redesign for Northwind12 pages, two templates
Setup checklist
The lg size with step status markers for an onboarding checklist.
Done:Create your studio workspace
In progress:Invite your designers
Not started:Add your first client
With badge and heading
A titled group with an info tooltip and a badge on each item.
Proposals
Packaging for Ferro CoffeeApproved
Campaign for Lumen StudioIn review
When to use
Use it when
- FAQs and long settings that would crowd a page
- A setup checklist with done / in progress / to do steps
Don’t use it when
- Content people must always see → plain sections
- Switching between views → Tabs
Rules
- Give items the same name to keep one open at a time
- size lg for checklists; md for lists and FAQs
Properties
Accordion
| Prop | Type | Default |
|---|---|---|
variant | "bordered" | "card" | "bordered" |
size | "md" | "lg" | "md" |
className | string | – |
children * | ReactNode | – |
AccordionGroup
| Prop | Type | Default |
|---|---|---|
title * | ReactNode | – |
info | ReactNode | – |
className | string | – |
children * | ReactNode | – |
AccordionItem
| Prop | Type | Default |
|---|---|---|
title * | ReactNode | – |
description | ReactNode | – |
status | "complete" | "current" | "pending" | – |
badge | ReactNode | – |
name | string | – |
defaultOpen | boolean | – |
className | string | – |
children * | ReactNode | – |
* required
Accessibility
- Native <details>/<summary>: keyboard and find-in-page work; status is also announced in words