Selection and input
Checkbox
A yes/no choice, usually one of several in a form.
iOSSwiftUI ToggleAndroidCompose CheckboxRenders in a Screen or an Island
Import
ts
import {Checkbox} from '@hzblj/kara-ui'Props
Material's Checkbox on Android. iOS has none, so there it is a SwiftUI Toggle — the same switch as Switch.
| Prop | Type | Default | Description |
|---|---|---|---|
| value* | boolean | — | Whether it is checked. Controlled — update it from |
| disabled | boolean | false | Dims the control and ignores taps. |
| label | string | — | Text beside the control. On Android the whole labelled row toggles it. |
| onValueChange | (value: boolean) => void | — | Called with the new value when the user toggles it. |
value*
booleanWhether it is checked. Controlled — update it from onValueChange.
disabledfalse
booleanDims the control and ignores taps.
label
stringText beside the control. On Android the whole labelled row toggles it.
onValueChange
(value: boolean) => voidCalled with the new value when the user toggles it.
Platform notes
- iOS has no checkbox of its own, so there it is a switch.