Mobile › Inputs
Checkbox
A yes-or-no choice with a label and an optional description. The whole row is the tap target.
Installation
npx expo install plankui-mobile react-native-safe-area-context expo-hapticsUsage
import { Checkbox } from "plankui-mobile";
const [agree, setAgree] = useState(false);
<Checkbox checked={agree} onChange={setAgree} label="I agree to the terms" />
<Checkbox checked={news} onChange={setNews} label="Monthly newsletter" description="One email a month." />iOS and Android
iOS: A round check, the way iOS lists mark choices.
Android: A Material 3 square checkbox with a 2 dp outline.
API reference
| Prop | Type | Default | Description |
|---|---|---|---|
| checked | boolean | Whether it is ticked. | |
| onChange | (v: boolean) => void | Called with the new value. | |
| label | string | – | Text next to the box. |
| description | string | – | A second line under the label. |
| disabled | boolean | false | Dims and blocks taps. |