Skip to content

Collapsible

Category: Surfaces & shell

<Collapsible title="Advanced options">
<p>Hidden by default. Click the header to reveal.</p>
</Collapsible>

Install: @helix-ui/core

import { Collapsible } from '@helix-ui/core';

status: stable · since: 0.1.0

Tags: disclosure, expand, accordion, show-hide

[▶ Title] ← collapsed
[▼ Title]
<children> ← expanded
  • display — block
  • width — fill
  • height — content
  • intrinsicSize — header always visible, body animates open/closed
  • stackable — true
  • fullBleed — false

A header row with a rotating chevron and a body that animates its height when toggled. Header uses font.weight.semibold and a hover surface; body uses default text.

Name Type Default Description
title ReactNode — Header label. Required.
isExpanded boolean — Controlled expanded state.
defaultExpanded boolean false Uncontrolled initial.
onExpandedChange (expanded: boolean) => void — Change handler.
isDisabled boolean false Disables toggling.
  • children — panel content

color.bg.surface.default, color.bg.action.neutral.default, color.text.primary, color.text.secondary, color.border.default, color.border.focus, radius.md, space.3, space.4, font.family.sans, font.size.md, font.size.sm, font.weight.medium

Notes

  • Built on react-aria-components Disclosure — full ARIA expanded/controls and keyboard handled.
  • For multiple coordinated collapsibles, use DisclosureGroup directly from react-aria-components.
Component Relation Note
Stack parent Group multiple Collapsibles in a Stack for an accordion.
NavigationMenu sibling
Tabs sibling

These are the AI prompt → JSX mappings used by the helix-ui prompt DSL and integrations like Cursor / Claude Code.

“expandable FAQ question”

<Collapsible title="What is helix-ui?">helix-ui is an AI-friendly design system.</Collapsible>