This documentation is available as Markdown for AI agents and LLMs. See the full Markdown index or append .md to any documentation URL.
This is documentation for the next SDK version. For up-to-date documentation, see the latest version (SDK 57).
LoadingIndicator
用于显示加载状态的 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: