Skip to main content
Collapsible component preview (light)
  • Location: sabo/src/components/ui/collapsible.tsx

When to use

  • Show/hide a small chunk of content (filters, advanced options).
  • Lighter than Accordion; you control trigger/button UI.

Usage

sabo/src/components/ui/collapsible.tsx

Key props

defaultOpen
boolean
Initial open/closed state.
asChild
boolean
Render trigger/content as child elements.
This component forwards all props from Radix Collapsible primitives (Root/Trigger/Content). Above are commonly used props. For the full API, see Radix docs: https://www.radix-ui.com/primitives/docs/components/collapsible

Styling tip

  • Provide clear visual feedback on open/close (icons, text).
  • Keep content short; for larger sections use Accordion.

Accessibility

  • Ensure the trigger is focusable; announce state via aria-expanded if you customize markup.