Pro component
Requires all-access to use the source code
import { Stack } from 'expo-router';
import { View } from 'react-native';
import { Checkbox } from '~/components/nativewindui/Checkbox';
export default function CheckboxScreen() {
return (
<>
<Stack.Screen options={{ title: 'Checkbox' }} />
<View className="flex-1 items-center justify-center py-4">
<Checkbox />
</View>
</>
);
}
Unlock All Pro Screens & Components
Elevate your app with powerful, native-feeling components and templates. Build faster with beautiful ready-to-use designs.
import { Checkbox } from '~/components/nativewindui/Checkbox';
<Checkbox />
Checkbox
Inherits all the props from rn-primitives's CheckboxPrimitive.Root component.
Prop | Type | Description |
---|---|---|
defaultChecked | boolean | The default checked state of the checkbox when it is uncontrolled. |
checked | boolean | The controlled checked state of the checkbox. |
onCheckedChange | (checked: boolean) => void | Callback called when the checked state changes. |