Layout and lists
Collapsible
Content that expands under its label.
iOSSwiftUI DisclosureGroupAndroidCompose AnimatedVisibilityRenders in a Screen or an Island
Import
ts
import {Collapsible} from '@hzblj/kara-ui'Props
A row that shows and hides its content: SwiftUI's DisclosureGroup on iOS; on Android a pressable row with a chevron over an animated reveal. A native atom — it renders inside <Screen> or <Island>.
| Prop | Type | Description |
|---|---|---|
| children* | ReactNode | Shown while |
| expanded* | boolean | Whether the content is shown. Update it from |
| label* | string | The row's text. |
| onExpandedChange* | (expanded: boolean) => void | The user pressed the row; it passes the state the row asks for. |
children*
ReactNodeShown while expanded.
expanded*
booleanWhether the content is shown. Update it from onExpandedChange.
label*
stringThe row's text.
onExpandedChange*
(expanded: boolean) => voidThe user pressed the row; it passes the state the row asks for.