Getting StartedInstall and bootstrap headless foundations 4
LayoutHeadless structural primitives for expandable and container patterns 6
OverlayHeadless modal and floating layer behavior 3
FeedbackHeadless notification and status communication patterns 5
FormHeadless input and selection contracts 17
UtilityReusable action, identity, and clipboard behavior 6
NavigationHeadless trails, trees, menus, and command surfaces 7

API reference

Headless collapsible is intentionally small. The primitive does not own state changes for you; it reflects the values you pass into the root, trigger, and content directives.

tngCollapsible

InputTypeDefaultHost hooks
openbooleanfalsedata-state="open|closed"
disabledbooleanfalsedata-disabled when true
Host slotdata-slot="collapsible"

button[tngCollapsibleTrigger]

InputTypeDefaultReflected behavior
openbooleanfalsearia-expanded plus data-state.
contentIdstring''Mirrors into aria-controls when provided.
disabledbooleanfalseApplies native disabled and data-disabled.
Host slotdata-slot="collapsible-trigger"

tngCollapsibleContent

InputTypeDefaultReflected behavior
openbooleanfalseRemoves hidden when open and mirrors data-state.
Host slotdata-slot="collapsible-content"

Owner responsibilities

  • Own the open state and wire the trigger click to your chosen toggle behavior.
  • Provide a stable content id if you want aria-controls on the trigger.
  • Author any extra state semantics inside the content, such as current, complete, or error steps.
  • Bring your own animation if the content should expand or collapse with motion.