Ballmac UI home

Collapsible

A single disclosure panel with a generous trigger, visible open state, and reduced-motion-aware content transition.

Three updates are included in this release.

  • Faster project search
  • Share links for guests
  • Improved export flow

Installation

$ pnpm dlx shadcn@latest add @ballmac/collapsible

Usage

import { Collapsible, CollapsibleTrigger, CollapsibleContent } from "@/components/ballmac/collapsible"

The full example is in the Code tab above.

Examples

Controlled disclosure

Controlled state: open

Only admins can change project defaults.

API reference

PropTypeDefault
showChevron

Show the rotating disclosure chevron after the label.

booleantrue

Also accepts the standard attributes of its root element.

Accessibility

KeyAction
Enter / SpaceOpens or closes the disclosure
TabMoves into visible content

Use with AI

Reveals one optional section of information with a keyboard-accessible disclosure trigger. With the shadcn MCP server set up (guide), ask your agent:

Add the Ballmac UI Collapsible (@ballmac/collapsible) to this project with the shadcn MCP, then use it where it fits.

Use it for

  • Advanced settings
  • Supporting detail in a dense card

Not for

  • Several related disclosures; use accordion
  • Primary content that should always be visible

Registry JSON: https://ui.ballmac.com/r/collapsible.json

Credits

Free to use in personal and commercial projects.

Registry
shadcn/utils