Simal UI
Components

Checkbox

Import

import { Checkbox } from '@simal/ui/nativewindui';

Props

PropValuesDefaultDescription
checkedbooleanControlled state. Leave it undefined to let the checkbox own its state through defaultChecked.
defaultCheckedbooleanStarting state when uncontrolled. Ignored once checked is passed.
onCheckedChangeFired with the next state on press. Without it a checked checkbox can never change.
disabledbooleanfalseBlocks press and drops the box to 50% opacity.

Examples

States

Controlled

Driven from outside via checked + onCheckedChange.

In A List

The shape it is actually used in: a list where each row owns one value and the label is part of the hit target. hitSlop is already 16 on the box, so the row does not need extra padding to be tappable.

On this page