Expo App UIExpo App UI
Components

Checkbox

Accessible checkbox with optional indeterminate state and label support.

Installation

npx expo-app-ui add checkbox

Usage

import Checkbox from "@/components/ui/checkbox";
import { useState } from "react";

const [v, setV] = useState(false);
<Checkbox value={v} onValueChange={setV} label="Accept terms" />

Props

PropTypeDefaultDescription
valuebooleanrequiredChecked state
onValueChange(v: boolean) => voidrequiredChange handler
labelstring-Optional label text
disabledbooleanfalseDisable interaction
size'sm' | 'md' | 'lg''md'Checkbox size
colorstring'#2563EB'Checked color
borderColorstring'#9CA3AF'Unchecked border
uncheckedBgstring'transparent'Unchecked background
indeterminatebooleanfalseShow indeterminate state
accessibilityLabelstringlabelScreen-reader label

Accessibility

  • accessibilityRole="checkbox"
  • accessibilityState.checked is true, false, or 'mixed' for indeterminate

On this page

Find this useful?

Buy me a coffee