List
A native scrolling list of rows.


Import
import {List, ListItem} from '@hzblj/kara-ui'Props
A scrolling list — SwiftUI List, Compose LazyColumn. It has no height of its own, so it needs one from outside: a Screen, or an Island with matchContents={false} and a height. In an island that sizes itself to its content Compose measures it against an infinite height and throws ("Vertically scrollable component was measured with an infinity maximum height"); SwiftUI shows nothing. For a handful of rows that should not scroll, use a VStack.
| Prop | Type | Description |
|---|---|---|
| children* | ReactNode | The rows — native views, one row each. |
| onRefresh | () => Promise<void> | Enables pull-to-refresh. Async on purpose — see |
| testID | string | Test identifier, forwarded to the native view on iOS — Android ignores it. |
The rows — native views, one row each.
Enables pull-to-refresh. Async on purpose — see ScrollViewProps.onRefresh: the spinner runs until the promise settles, so neither platform needs a refreshing flag kept in sync by hand.
Test identifier, forwarded to the native view on iOS — Android ignores it.
Platform notes
- A list scrolls, so it needs a height from outside: a
Screen, or anIslandwithmatchContents={false}and a height. - Rows are separated for you — a
Divideramong them is one too many. onRefreshreturns a promise; the spinner runs until it settles.

