Reference version

Checkbox

A toggle control that represents a checked or unchecked state.

Android
iOS
Web
Included in Expo Go
Bundled version:
~56.0.2

For the complete documentation index, see llms.txt. Use this file to discover all available pages.

A controlled checkbox. Pair value with onValueChange to manage state from React.

Installation

Terminal
npx expo install @expo/ui

If you are installing this in an existing React Native app, make sure to install expo in your project.

Usage

Basic checkbox

CheckboxExample.tsx
import { useState } from 'react'; import { Host, Checkbox } from '@expo/ui'; export default function CheckboxExample() { const [accepted, setAccepted] = useState(false); return ( <Host matchContents> <Checkbox label="I accept the terms" value={accepted} onValueChange={setAccepted} /> </Host> ); }

Disabled

DisabledCheckboxExample.tsx
import { Host, Checkbox } from '@expo/ui'; export default function DisabledCheckboxExample() { return ( <Host matchContents> <Checkbox label="Locked option" value onValueChange={() => {}} disabled /> </Host> ); }

API

import { Checkbox } from '@expo/ui';

Component

Checkbox

Android
iOS
Web

Type: React.Element<CheckboxProps>

A toggle control that represents a checked or unchecked state.

Props for the Checkbox component.

CheckboxProps

disabled

Android
iOS
Web
Optional • Type: boolean

Whether the checkbox is disabled. Disabled checkboxes do not respond to user interaction.

label

Android
iOS
Web
Optional • Type: string

Text label displayed alongside the checkbox.

modifiers

Android
iOS
Web
Optional • Type: ModifierConfig[]

Platform-specific modifier escape hatch. Pass an array of modifier configs from @expo/ui/swift-ui/modifiers or @expo/ui/jetpack-compose/modifiers.

onValueChange

Android
iOS
Web
Type: (value: boolean) => void

Called when the user toggles the checkbox.

testID

Android
iOS
Web
Optional • Type: string

Identifier used to locate the component in end-to-end tests.

value

Android
iOS
Web
Type: boolean

Whether the checkbox is checked.