Reference version

This documentation is available as Markdown for AI agents and LLMs. See the full Markdown index or append .md to any documentation URL.

Jetpack Compose

使用 @expo/ui 构建原生 Android 界面的 Jetpack Compose 组件。

Android
Recommended version:
~0.2.0-beta.9

@expo/ui/jetpack-compose 中的 Jetpack Compose 组件允许你使用来自 React Native 的 Jetpack Compose 构建完全原生的 Android 界面。

安装

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.

组件

Button

CircularProgress

ContextMenu

Chip

DateTimePicker (日期)

DateTimePicker (时间)

LinearProgress

Picker (单选)

Picker (分段)

Slider

Switch (切换)

Switch (复选框)

TextInput

API

完整文档尚不可用。请使用 TypeScript 类型来探索该 API。

// 从 Jetpack Compose 包导入 import { Button } from '@expo/ui/jetpack-compose';