This documentation is available as Markdown for AI agents and LLMs. See the full Markdown index or append .md to any documentation URL.
Expo 复选框
一个通用的 React 组件,提供基本的复选框功能。
expo-checkbox 为所有平台提供了一个基础的 boolean 输入元素。
安装
🌐 Installation
用法
🌐 Usage
下面显示了 expo-checkbox 在 Android 和 iOS 上的显示示例:
🌐 An example of how expo-checkbox appears on Android and iOS is shown below:
应用接口
🌐 API
import { Checkbox } from 'expo-checkbox';
Component
Type: React.Element<CheckboxProps>
ColorValueThe tint or color of the checkbox. This overrides the disabled opaque style.
booleanIf the checkbox is disabled, it becomes opaque and uncheckable.
(event: NativeSyntheticEvent<CheckboxEvent> | SyntheticEvent<HTMLInputElement, CheckboxEvent>) => voidCallback that is invoked when the user presses the checkbox.
event: NativeSyntheticEvent<CheckboxEvent> | SyntheticEvent<HTMLInputElement, CheckboxEvent>A native event containing the checkbox change.
(value: boolean) => voidCallback that is invoked when the user presses the checkbox.
value: booleanA boolean indicating the new checked state of the checkbox.
boolean • Default: falseValue indicating if the checkbox should be rendered as checked or not.