Skip to content
nexubDesign System
v2.4.0

Components · Disclosure

Collapsible

StableSince v0.0.1

Toggle visibility of content with smooth animation.

import { Collapsible } from '@nexub/react';

Examples

Default

Controlled

Props

Props
PropTypeDefaultDescription
Collapsible.Root openboolean—Controlled open state.
Collapsible.Root defaultOpenbooleanfalseWhether the collapsible is open by default (uncontrolled).
Collapsible.Root onOpenChange(open: boolean) => void—Callback fired when the open state changes.
Collapsible.Root disabledbooleanfalsePrevents the user from toggling the collapsible.
Collapsible.Trigger asChildbooleanfalseMerges props onto the immediate child element (Radix Slot).
Collapsible.Content forceMountbooleanfalseKeeps the content mounted in the DOM even when closed.

On iOS & Android