Layout/Collapsible

Collapsible

A standalone expand/collapse section with a spring-animated height transition and rotating chevron indicator.

import { Collapsible } from "@animui/ui"

Basic

Animui is an animated React + Tailwind component library.

Controlled

Props

PropTypeDefaultDescription
triggerReact.ReactNodeContent rendered in the clickable header, next to the chevron indicator.
childrenReact.ReactNodeContent revealed when expanded.
openbooleanControlled open state.
defaultOpenbooleanfalseInitial open state when uncontrolled.
onOpenChange(open: boolean) => voidCalled whenever the open state changes.
classNamestringAdditional classes for the wrapper.

Accessibility

  • Trigger is a real button element, focusable and keyboard-activatable.
  • Exposes aria-expanded reflecting the current open state.
© 2026 Steal Shadow. MIT License.Report an issue