zynactradocs

Collapsible

Shows and hides one region. The building block under Accordion, for one-off cases.

4 checks passed on main

typecheck

Usage

import {
  Collapsible,
  CollapsibleContent,
  CollapsibleTrigger,
} from "@zynactra/ui/collapsible"
<Collapsible>
  <CollapsibleTrigger>Show details</CollapsibleTrigger>
  <CollapsibleContent>Details.</CollapsibleContent>
</Collapsible>

Guidelines

  • Keep a summary visible when closed ("4 checks passed"), so closing loses nothing important.
  • The trigger needs an accessible name. For an icon button, add sr-only text.
  • For a list of sections, use Accordion.

API reference

Behaviour and props come from Base UI. See the Base UI Collapsible docs.

Edit on GitHub

On this page