Components
iOSAndroid
Installation
pnpm dlx @docyrus/cli add @docyrus/rn-checkboxUsage
import { Checkbox } from '@/components/docyrus-native/checkbox';
<Checkbox checked={agreed} onCheckedChange={setAgreed} label="I agree" />
<Checkbox size="lg" checked />
<Checkbox disabled label="Disabled" />API Reference
| Prop | Type | Default | Description |
|---|---|---|---|
checked | boolean | false | Checkbox state |
onCheckedChange | (checked: boolean) => void | — | State change handler |
disabled | boolean | false | Disable interaction |
size | 'sm' | 'md' | 'lg' | 'md' | Checkbox size |
label | string | — | Optional label text |
className | string | — | Additional CSS classes |
labelClassName | string | — | Label CSS classes |
accessibilityLabel | string | — | Accessibility label |
Type Exports
| Type | Description |
|---|---|
CheckboxProps | Props for Checkbox component |
CheckboxSize | 'sm' | 'md' | 'lg' |