Components · Disclosure
Accordion
StableSince v0.0.1
Vertically stacked list of collapsible sections.
import { Accordion } from '@nexub/react';Examples
Default
Multiple
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| Accordion.Root type | 'single' | 'multiple' | 'single' | Whether one or multiple items can be open at the same time. |
| Accordion.Root collapsible | boolean | false | When type is "single", allows the open item to be collapsed by clicking it again. |
| Accordion.Root defaultValue | string | string[] | — | The item(s) open by default (uncontrolled). |
| Accordion.Root value | string | string[] | — | Controlled open item(s). |
| Accordion.Root onValueChange | (value: string | string[]) => void | — | Callback fired when the open state changes. |
| Accordion.Root disabled | boolean | false | Disables all items in the accordion. |
| Accordion.Item valuerequired | string | — | Unique identifier for the item. |
| Accordion.Item disabled | boolean | false | Disables this specific item. |
| Accordion.Trigger asChild | boolean | false | Merges props onto the immediate child element. |
| Accordion.Content forceMount | boolean | false | Keeps content in the DOM even when collapsed. |
On iOS & Android: Accordion
@nexub/react-nativeAlpha
import { Accordion } from '@nexub/react-native';
<Accordion title="Fees">…</Accordion>Web vs mobile
Same tokens and prop names. Where the platforms differ:
| Web | iOS & Android | |
|---|---|---|
| API | Compound (Root, Item, Trigger, Content), single or multiple. | One Accordion per section with title; stack them. |
Interactive preview of @nexub/react-native rendered for the web. Native chrome (switches, pickers, Liquid Glass) looks like the platform on a device.
On device

iPhone (iOS simulator)

Pixel (Android emulator)
Screenshots from the latest CI run of the showcase app; the live frame renders the same code for the web.
Accordion props
| Prop | Type | Default | Description |
|---|---|---|---|
| titlerequired | string | — | — |
| expanded | boolean | — | — |
| defaultExpanded | boolean | false | — |
| onExpandedChange | (expanded: boolean) => void | — | — |
| childrenrequired | React.ReactNode | — | — |
| style | StyleProp<ViewStyle> | — | — |