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 加载指示器与官方 Jetpack Compose 加载指示器 API 保持一致。


安装
If you are installing this in an existing React Native app, make sure to install expo in your project.
用法
加载指示器
来自 Material 3 Expressive 的变形形状加载动画。
容器加载指示器
位于有色背景中的加载指示器。
不确定进度
省略 progress 属性即可持续动画,而不指示具体完成进度。
确定进度
将来自 useNativeState 的可观察状态作为 progress 传入。将 progress.value 更新为 0 到 1 之间。
API
import { LoadingIndicator, ContainedLoadingIndicator, } from '@expo/ui/jetpack-compose';
Components
Type: React.Element<ComponentType<ContainedLoadingIndicatorProps>>
A loading indicator that displays loading using morphing shapes inside a container.
Matches the Jetpack Compose ContainedLoadingIndicator.
Type: React.Element<ComponentType<LoadingIndicatorCommonConfig>>
A loading indicator that displays loading using morphing shapes.
Matches the Jetpack Compose LoadingIndicator.
Types
Observable state shared between JavaScript and native views (Jetpack Compose on Android and SwiftUI on iOS).
Type: SharedObject extended by: