Skip to content

    Browse components

    Collapsible

    Show-more region whose height, opacity and blur ease open smoothly, controlled or uncontrolled.

    Open
    Customize

    Installation

    npx shadcn@latest add @glint-ui/collapsible

    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/collapsible.json

    Usage

    import { Collapsible } from "@/components/ui/collapsible";
    
    <Collapsible>
      <CollapsibleTrigger>Show all items</CollapsibleTrigger>
      <CollapsibleContent>...</CollapsibleContent>
    </Collapsible>

    Props

    PropTypeDefaultDescription
    defaultOpenbooleanfalseInitial open state when uncontrolled.
    disabledbooleanfalseDisable the trigger.
    openReactNode—Controlled open state (with onOpenChange).
    onOpenChangeReactNode—Called with the next open state.
    classNamestring—Extra classes for the root element.