Layout and lists

Collapsible

Content that expands under its label.

iOSSwiftUI DisclosureGroupAndroidCompose AnimatedVisibilityRenders in a Screen or an Island
iOSSwiftUI DisclosureGroup
AndroidCompose AnimatedVisibility

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>.

PropTypeDescription
children*ReactNode

Shown while expanded.

expanded*boolean

Whether the content is shown. Update it from onExpandedChange.

label*string

The row's text.

onExpandedChange*(expanded: boolean) => void

The user pressed the row; it passes the state the row asks for.

children*
ReactNode

Shown while expanded.

expanded*
boolean

Whether the content is shown. Update it from onExpandedChange.

label*
string

The row's text.

onExpandedChange*
(expanded: boolean) => void

The user pressed the row; it passes the state the row asks for.