Skip to content
Components / Collections

Collapsible

A disclosure for reasoning, sources or a long detail.

@fabrials/ui
Loading state

Installation

  1. Import the control from @fabrials/ui, after setting the app up.

    TypeScript
    import { Collapsible, CollapsibleTrigger, CollapsibleContent } from "@fabrials/ui";
  2. Or install it under shadcn's name, so code that imports @/components/ui/collapsible gets this control. See shims.

    npx shadcn@latest add @fabrials/collapsible

API reference

Prop / exportTypeDescription
defaultOpenbooleanStart expanded when the detail is the point of the screen.

Behavior

The trigger names what is hidden. The content stays in the tab order when open.

Accessibility

Keyboard and contrast
Keep visible labels, keyboard focus and status announcements when customizing. These components inherit your theme; maintain sufficient contrast in both color modes. The preview is keyboard operable.