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 Progress Indicators 与官方 Jetpack Compose Progress Indicator API 保持一致。


安装
If you are installing this in an existing React Native app, make sure to install expo in your project.
用法
线性进度
用于指示进度的水平填充条。在确定性模式下,提供一个介于 0 和 1 之间的 progress 值。
圆形进度
通过增大描边来指示进度的旋转圆环。
不确定性进度
省略 progress 属性,即可在不指示具体完成程度的情况下持续播放动画。
自定义颜色
使用 color 设置指示器颜色,使用 trackColor 设置背景轨道颜色。
波浪变体
LinearWavyProgressIndicator 和 CircularWavyProgressIndicator 添加了来自 Material 3 Expressive 的富有表现力的波浪动画。
波浪配置
使用 amplitude 设置波浪高度,从表示平直线条的 0 到表示完整高度的 1。使用 wavelength 设置单个波浪的长度,单位为 dp;使用 waveSpeed 设置波浪移动的速度,单位为每秒 dp。waveSpeed 默认为 wavelength。设置 waveSpeed={0} 可渲染静态波浪。
API
import { LinearProgressIndicator, CircularProgressIndicator, LinearWavyProgressIndicator, CircularWavyProgressIndicator, } from '@expo/ui/jetpack-compose';
Components
Type: React.Element<ComponentType<CircularProgressIndicatorProps>>
A circular progress indicator that displays progress in a circular format.
Matches the Jetpack Compose CircularProgressIndicator.
StrokeCap • Default: 'round'Stroke cap style for the indicator ends.
Type: React.Element<ComponentType<CircularWavyProgressIndicatorProps>>
A circular progress indicator with wavy animation style.
Matches the Jetpack Compose CircularWavyProgressIndicator.
Type: React.Element<ComponentType<LinearProgressIndicatorProps>>
A linear progress indicator that displays progress in a horizontal bar.
Matches the Jetpack Compose LinearProgressIndicator.
DrawStopIndicatorConfigConfiguration for the stop indicator dot at the end of the determinate progress track.
StrokeCap • Default: 'round'Stroke cap style for the indicator ends.
Type: React.Element<ComponentType<LinearWavyProgressIndicatorProps>>
A linear progress indicator with wavy animation style.
Matches the Jetpack Compose LinearWavyProgressIndicator.
Types
Configuration for the stop indicator dot at the end of the determinate linear progress track. When provided, draws a stop indicator with the given options. Omit to use the Compose default.
Literal type: string
Stroke cap style for progress indicators.
Acceptable values are: 'round' | 'butt' | 'square'