Collapsible
A single disclosure that shows or hides one block of content behind a trigger.
Paste this into your agent.
Collapsible tucks away one optional section, such as advanced options, order details or one branch of a file tree. It toggles visibility. Your app handles loading and navigation.
Install
bashnpx shadcn@4.18.0 add @siteplane/collapsible
Import it from @/siteplane/components/collapsible. The project needs Siteplane UI's one-time setup first: .
When to pick it
- vs : Pick Accordion instead for a list of related sections that behave as a group.
- vs : Pick Popover instead when the extra content should float over the page without pushing content down.
Rules
- Use open and onOpenChange when your app owns the state, or defaultOpen when it does not.
- Give an icon-only CollapsibleTrigger an accessible label that stays meaningful whether open or closed.
- Add a chevron yourself with data-slot="collapsible-chevron"; the trigger draws no indicator by default.
- Set keepMounted on CollapsiblePanel when closed content must stay in the DOM, such as a form section.
- Nest collapsibles for a tree and pass a smaller ghost button through render for compact rows.
Reference
Add to your agent
Print this skill from the terminal, or connect the whole catalog over MCP. Setup guides
CLI
MCP server
Questions
Related skills
Accessible Focus Statesby UI Skillbook
Keep a visible, high-contrast focus indicator on every interactive element, without a generic browser outline or none at all.
Accessibility
Better Accessibilityby jakubkrehel
Review and improve focus states, keyboard support, ARIA, forms, screen readers, hit areas, and motion accessibility.
AccessibilityExternalGitHub stars: 9.2K
Build Primitiveby PrototyperAI
Build foundational UI primitives from scratch with strong ARIA, keyboard, focus, and state handling.
AccessibilityExternalGitHub stars: 7
Link Purposeby AccessLint
Compatibility listing for link-purpose installs from AccessLint's marketplace skill set.
AccessibilityExternalGitHub stars: 114