# garn — full component reference > The complete, machine-readable reference for every garn component, concatenated from the > canonical ComponentInfo source. Each section is one component. Generated for AI consumption. Components: accordion, activity-grid, alert-dialog, alert, app-shell, aspect-ratio, avatar, badge-select, badge, bar-list, board, breadcrumb, bullet, button-group, button, calendar, card, carousel, chart, checkbox, collapsible, combobox, command, context-menu, counter, data-list, date-picker, date-time-picker, dialog, drawer, dropdown-menu, empty, field, file-upload, filters, form, gallery, gantt, gauge, heatmap, hover-card, inline-edit, input-otp, input, kbd, label, list, menubar, multi-select, navigation-menu, number-field, pagination, popover, progress, radio-group, rating, resizable, scheduler, scroll-area, select, separator, sheet, skeleton, slider, sonner, sortable, sparkline, spinner, stat, stepper, switch, table, tabs, tag, textarea, time-field, time-picker, timeline, toggle-group, toggle, toolbar, tooltip, tracker, tree. --- # Accordion > Stacked, collapsible sections that show one panel's content at a time (or several). - **Status:** stable - **Version:** `0.3.0` (since `0.1.0`) - **Pattern:** disclosure - **Import:** `import { Accordion } from "@garn/ui/accordion"` ## Overview Accordion lets users expand and collapse stacked sections to manage long content — FAQs, settings groups, nested details. `Accordion` sets `type` (`single` for one-open-at-a-time, `multiple` for independent toggles); each `AccordionItem` pairs an `AccordionTrigger` header with a collapsible `AccordionContent`. Use it to tame a long single page; for switching between peer views use Tabs, and for one isolated show/more region use Collapsible. ## When to use Let users expand/collapse sections to manage long content — FAQs, settings groups, nested details. ## When not to use Switching between peer views where only one is ever relevant (use tabs); a single open/close region (use collapsible). ## Do / Don't - ✅ Give every AccordionItem a unique `value`. - ✅ Use `type="single" collapsible` for FAQ-style one-at-a-time; `type="multiple"` when several can stay open. - ✅ Put the trigger text in the heading so it reads as a real section header. - ❌ Don't nest the primary navigation in an accordion — it hides wayfinding. - ❌ Don't use an accordion when all content should be visible at once. ## Guidelines **Reach for an accordion only when content is genuinely long.** Collapsing a handful of short items adds clicks for no gain — show them outright. It shines when scanning headers first, then drilling into one section, is the natural flow (an FAQ). **Choose `single` vs `multiple` deliberately.** `single` keeps focus on one section and a tidy page; `multiple` lets users compare sections side by side. Write headers that summarize their panel so the collapsed list is itself scannable. **Keep triggers as headings and don't hide essentials.** The trigger sits in a real heading for navigation, and `aria-expanded` reflects state — don't bury required form fields or critical info inside a collapsed panel a user might never open. ## State model - `value` (controlled) / `defaultValue` (uncontrolled), `onValueChange` · string | string[] — The open item id(s). `type="single"` ⇒ string (+ `collapsible` to allow closing all); `type="multiple"` ⇒ string[]. ## Anatomy **Parts** - `Accordion` (`accordion`) · required: Root — sets `type` (single | multiple) and owns the open `value`. - `AccordionItem` (`accordion-item`) · required: One section; needs a unique `value`. - `AccordionTrigger` (`accordion-trigger`) · required: The header button that toggles its item (rendered inside a heading). - `AccordionContent` (`accordion-content`) · required: The collapsible panel body. ## Accessibility - **Role:** button (APG: accordion) - **Enter / Space:** Toggle the focused section. - **Tab:** Move between triggers and into open content. - **WCAG:** 1.3.1 Info and Relationships (A); 2.1.1 Keyboard (A); 4.1.2 Name, Role, Value (A) - Each trigger is a