导航搜索
搜索并跳转到页面
Loading dashboard...
常用于活动、发布节奏与任务期限提醒。
关键节点倒计时
搭配动效强调剩余时间。
示例代码
"use client";
const targetMs = Date.now() + 30 * 60 * 1000;
const countdown = useCountdown(targetMs);
<div className="flex items-center gap-2 text-3xl font-semibold tabular-nums leading-none">
<span className="inline-flex min-w-[52px] justify-center rounded-xl border border-border bg-muted px-3 py-2">
{String(countdown.hours).padStart(2, "0")}
</span>
<span className="text-muted-foreground">:</span>
<span className="inline-flex min-w-[52px] justify-center rounded-xl border border-border bg-muted px-3 py-2">
{String(countdown.minutes).padStart(2, "0")}
</span>
<span className="text-muted-foreground">:</span>
<span className="inline-flex min-w-[52px] justify-center rounded-xl border border-border bg-muted px-3 py-2">
<RollingSeconds value={countdown.seconds} />
</span>
</div>版本发布倒计时
准备好发布说明与公告。
今晚数据同步
同步期间暂停批量导入。
示例代码
"use client";
const targetMs = Date.now() + 2 * 60 * 60 * 1000;
<CountdownDigits targetMs={targetMs} highlight />渠道广告下线
运营团队
数据模型同步
数据团队
客户回访任务
客户成功
示例代码
"use client";
const targetMs = Date.now() + 45 * 60 * 1000;
<CompactCountdown targetMs={targetMs} />客服响应 SLA
重置到 15 分钟倒计时。
示例代码
"use client";
const [targetMs, setTargetMs] = useState(Date.now() + 15 * 60 * 1000);
<CountdownDigits targetMs={targetMs} />
<Button variant="outline" onClick={() => setTargetMs(Date.now() + 15 * 60 * 1000)}>
重置 15 分钟
</Button>
<Button onClick={() => setTargetMs(Date.now() + 60 * 60 * 1000)}>续时 1 小时</Button>活动剩余 30 分钟
批处理任务
当前批次剩余时间
示例代码
"use client";
const totalMs = 30 * 60 * 1000;
const targetMs = Date.now() + totalMs;
<ProgressCountdown targetMs={targetMs} totalMs={totalMs} />