This documentation is available as Markdown for AI agents and LLMs. See the full Markdown index or append .md to any documentation URL.
颜色选择器
一个用于选择颜色的 SwiftUI 颜色选择器组件。
iOS
Included in Expo Go
Expo UI ColorPicker 与官方 SwiftUI ColorPicker API 保持一致,并允许应用用户从调色板中选择颜色。


安装
Terminal
If you are installing this in an existing React Native app, make sure to install expo in your project.
用法
基本颜色选择器
ColorPickerExample.tsx
支持不透明度的颜色选择器
使用 supportsOpacity 属性允许用户选择带有 alpha 透明度的颜色。
ColorPickerOpacityExample.tsx
API
import { ColorPicker } from '@expo/ui/swift-ui';
Component
Type: React.Element<ColorPickerProps>
Renders a ColorPicker component using SwiftUI.