跳到主要内容

StatusDot 状态点

任务列表 / 推理链通用的状态圆点。三态(done / active / pending)× 两风格(flat / soft)。

状态视觉内部
done绿底 + 白勾success 填充 + <Icon name="check" />
active边框 + 内嵌 <PulseDot>primary 边框 + 跳动
pending仅边框outline 灰边

tone='flat'(默认)—— pending/active 底色透明,用于 Task。 tone='soft' —— pending = surface、active = primaryContainer,用于 ChainOfThought(推理链气氛更柔)。

实时预览

flat(任务列表风格)
done
active
pending
soft(推理链风格)
done
active
pending

用法

import { StatusDot } from '@unif/react-native-design';

// 任务列表风格
<StatusDot status="done" size={16} />
<StatusDot status="active" size={16} />
<StatusDot status="pending" size={16} />

// 推理链风格(柔色)
<StatusDot status="active" size={18} tone="soft" />

API

Prop类型默认说明
status'done' | 'active' | 'pending'当前状态
sizenumber16圆点直径
tone'flat' | 'soft''flat'flat 透明底;soft 柔色底(pending=bgCard、active=primary0)

内部使用

  • Task TaskRow —— <StatusDot status={mapped} size={16} />(todo→pending、running→active、done→done)
  • ChainOfThought Step —— <StatusDot status={step.status} size={18} tone="soft" />

设计原则

设计上的"做完了 / 在做 / 还没做"在 Unif 系统里只有这一种视觉表达,新组件需要状态指示请直接用 StatusDot,不要自画。