Components

Checkbox

Standalone checkbox component with optional label and size variants.

iOSAndroid
Preview Checkbox on your device

Scan with Expo Go

Download Expo Go, then scan the QR code to preview native components.

Installation

pnpm dlx @docyrus/cli add @docyrus/rn-checkbox

Usage

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

PropTypeDefaultDescription
checkedbooleanfalseCheckbox state
onCheckedChange(checked: boolean) => void—State change handler
disabledbooleanfalseDisable interaction
size'sm' | 'md' | 'lg''md'Checkbox size
labelstring—Optional label text
classNamestring—Additional CSS classes
labelClassNamestring—Label CSS classes
accessibilityLabelstring—Accessibility label

Type Exports

TypeDescription
CheckboxPropsProps for Checkbox component
CheckboxSize'sm' | 'md' | 'lg'

On this page