Skip to content

    Browse components

    Accordion

    Stacked disclosure sections with smooth auto-height animation, a springy chevron and full arrow/Home/End keyboard support.

    Open
    Customize
    single
    multiple

    Installation

    npx shadcn@latest add @glint-ui/accordion

    First time using @glint-ui? Add the registry to components.json once, or install by URL: npx shadcn@latest add https://glintui.vercel.app/r/accordion.json

    Usage

    import { Accordion } from "@/components/ui/accordion";
    
    <Accordion type="single" defaultValue={["shipping"]}>
      <AccordionItem value="shipping">
        <AccordionTrigger>How long does shipping take?</AccordionTrigger>
        <AccordionContent>Orders ship within 2 business days.</AccordionContent>
      </AccordionItem>
    </Accordion>

    Props

    PropTypeDefaultDescription
    type"single" | "multiple""single"Keep one item open, or allow many.
    collapsiblebooleantrueSingle mode: allow closing the open item.
    defaultValuestring[]—Values of the items open on first render.
    valueReactNode—Controlled open values (string[]).
    onValueChangeReactNode—Called with the new open values.
    classNamestring—Extra classes for the root element.