定价

以条形或圆形反馈任务进度,支持明确进度与不确定状态,适合上传、处理和加载过程。

我们正在让 SnowUI 组件成为 AI 对话中可直接操作的界面。目前对话交互能力仍在建设中;本页展示网站用法,支持的对话平台与组件版本将在验证后公布。 AI 对话内生成和使用 SnowUI 界面完全免费,不属于项目,不占项目或开发者席位额度,无需 SnowUI 注册、激活或付费证明。

如何使用

用于已知或未知完成度的进度反馈;未知进度使用 isIndeterminate。纯等待指示也可用 Spinner,业务数值仪表可选 GaugeChart。

  • value 是 0–100 的百分比;未知进度使用 isIndeterminate,不能用虚构百分比代替。

  • variant 选择 line / circle;circle 的 showLabel 生成标签,显式 children 替换默认标签。

导入

import { Progress } from '@snowui-design-system/components';

用法

线形

圆形

线形标签

圆形标签

不确定进度线形

不确定进度圆形

颜色

尺寸与粗细

API 参考

属性 类型 默认值 示例 描述
value number 0 value={42} 百分比进度,自动 clamp 到 0–100
variant ProgressVariant "line" variant={value} 长条形或圆形
size number | string 16 size="Example" 圆形宽高;与 Spinner 默认一致
thickness number | string — thickness="Example" 长条形高度或圆环粗细;circle / 不确定态对齐 Spinner 环宽 默认行为:line 确定态 4;circle 与不确定态为 size 的 15%(size=16 时 2.4px)。
background SnowUIColor | string "Black4" background="Example" 轨道底色
color SnowUIColor | string "Primary" color="Example" 填充颜色
isIndeterminate boolean false isIndeterminate 不确定态
showLabel boolean false showLabel 仅 circle 生效;确定态下生成显示实时 value 的内置 Text
loopMotion LoopMotionConfig — loopMotion={{ duration: 1200 }} 覆盖不确定态循环时序
children Snippet — <Progress value={60}><Frame as="label">…</Frame></Progress> 显式 label 组合;存在时替换 circle 内置 label
parts ComponentPartsOf<{ Text: typeof Text }> — parts={{ Text: { color: "Black100" } }} 配置 circle 的内置 Text label