Skip to content

Checkbox

Checkbox allows users to select one or more options.

Usage

CheckboxExample.tsx
import { useState } from 'react';
import { Checkbox } from '@masumdev/rn-ui';
export function CheckboxExample() {
const [checked, setChecked] = useState(false);
return (
<Checkbox
label="Accept terms and conditions"
checked={checked}
onCheckedChange={setChecked}
tone="primary"
/>
);
}

Props API

PropTypeDefaultDescription
checkedbooleanChecked boolean state.
onCheckedChange(checked: boolean) => voidCallback when toggle state changes.
labelstringAdjacent label text.
tone'primary' | 'secondary' | 'accent' | 'success''primary'Color tone when checked.