据 AlphaMoat 统计,截至 2026-09,Animated Financial Display Design System 累计下载 1,619 次、获 0 个星标,在全部 5,078 个 AI 技能中排名第 4,690 位,在「设计创意」分类(512 个)中排名第 469 位。
| 平台 | 累计安装 | 累计下载 | 星标 | 评论 |
|---|---|---|---|---|
| ClawHub ↗ | 44 | 1,490 | - | - |
| SkillHub ↗ | 126 | 1,619 | - | — |
各平台的计数口径不同,统计时间不一致。
内容包括弹簧动画计数器、数值变化时的颜色闪烁,以及货币格式化示例,可用于交易界面或金融仪表板。示例中的货币、地区设置和精度不一定适用于目标应用;安装来源也应先审查或固定。 应按目标应用调整币种、地区和精度。
资料发布于 2026-10-29
以下是根据技能文档生成的示例,不代表实际运行结果。
2026-09 起统计方法调整:同名技能按作者分别统计,并覆盖全部技能。图中虚线为调整前的月份,与之后的数据不直接比较,也不计算跨越调整的增长。
| 月份 | 累计下载 | 环比 | 星标 |
|---|---|---|---|
| 2026-09 | 1,619 | — | - |
| 2026-08 | 1,447 | +7.3% | - |
| 2026-07 | 1,349 | +15.2% | - |
| 2026-06 | 1,171 | +7.4% | - |
| 2026-05 | 1,090 | — | - |
| 2026-03 | 843 | — | - |
以下是作者发布的原始文件,按纯文本显示,本站未做修改或审核;其中的链接不可点击,命令请核实后再运行。抓取于 2026-10-23。
--- name: animated-financial-display model: standard description: Patterns for animating financial numbers with spring physics, formatting, and visual feedback. Covers animated counters, price tickers, percentage changes, and value flash effects. Use when building financial dashboards or trading UIs. Triggers on animated number, price animation, financial display, number formatting, spring animation, value ticker. --- # Animated Financial Display Create engaging financial number displays with smooth animations, proper formatting, and visual feedback on value changes.
---
## When to Use
- Building trading dashboards with live prices
- Showing portfolio values that update in real-time
- Displaying metrics that need attention on change
- Any financial UI that benefits from motion
---
## Pattern 1: Spring-Animated Number
Using framer-motion's spring physics:
```tsx
import { useSpring, animated } from '@react-spring/web';
import { useEffect, useRef } from 'react';
interface AnimatedNumberProps {
value: number;
prefix?: string;
suffix?: string;
decimals?: number;
duration?: number;
}
export function AnimatedNumber({
value,
prefix = '',
suffix = '',
decimals = 2,
duration = 500,
}: AnimatedNumberProps) {
const prevValue = useRef(value);
const { number } = useSpring({
from: { number: prevValue.current },
to: { number: value },
config: { duration },
});
useEffect(() => {
prevValue.current = value;
}, [value]);
return (
<animated.span className="tabular-nums">
{number.to((n) => `${prefix}${n.toFixed(decimals)}${suffix}`)}
</animated.span>
);
}
```
### Usage
```tsx
<AnimatedNumber value={price} prefix="$" decimals={2} />
<AnimatedNumber value={percentage} suffix="%" decimals={1} />
```
---
## Pattern 2: Value with Flash Effect
Flash color on value change:
```tsx
import { useEffect, useState, useRef } from 'react';
import { cn } from '@/lib/utils';
interface FlashingValueProps {
value: number;
formatter: (value: number) => string;
}
export function FlashingValue({ value, formatter }: FlashingValueProps) {
const [flash, setFlash] = useState<'up' | 'down' | null>(null);
const prevValue = useRef(value);
useEffect(() => {
if (value !== prevValue.current) {
setFlash(value > prevValue.current ? 'up' : 'down');
prevValue.current = value;
const timer = setTimeout(() => setFlash(null), 600);
return () => clearTimeout(timer);
}
}, [value]);
return (
<span
className={cn(
'transition-colors duration-600',
flash === 'up' && 'text-success',
flash === 'down' && 'text-destructive'
)}
>
{formatter(value)}
</span>
);
}
```
---
## Pattern 3: Financial Number Formatting
```typescript
// lib/formatters.ts
export function formatCurrency(
value: number,
options: {
currency?: string;
compact?: boolean;
decimals?: number;
} = {}
): string {
const { currency = 'USD', compact = false, decimals = 2 } = options;
if (compact && Math.abs(value) >= 1_000_000_000) {
return `$${(value / 1_000_000_000).toFixed(1)}B`;
}
if (compact && Math.abs(value) >= 1_000_000) {
return `$${(value / 1_000_000).toFixed(1)}M`;
}
if (compact && Math.abs(value) >= 1_000) {
return `$${(value / 1_000).toFixed(1)}K`;
}
return new Intl.NumberFormat('en-US', {
style: 'currency',
currency,
minimumFractionDigits: decimals,
maximumFractionDigits: decimals,
}).format(value);
}
export function formatPercentage(
value: number,
options: { showSign?: boolean; decimals?: number } = {}
): string {
const { showSign = true, decimals = 2 } = options;
const sign = showSign && value > 0 ? '+' : '';
return `${sign}${value.toFixed(decimals)}%`;
}
export function formatNumber(
value: number,
options: { compact?: boolean; decimals?: number } = {}
): string {
const { compact = false, decimals = 0 } = options;
if (compact) {
return Intl.NumberFormat('en-US', {
notation: 'compact',
maximumFractionDigits: 1,
}).format(value);
}
return new Intl.NumberFormat('en-US', {
minimumFractionDigits: decimals,
maximumFractionDigits: decimals,
}).format(value);
}
```
---
## Pattern 4: Price Ticker Component
```tsx
interface PriceTickerProps {
symbol: string;
price: number;
change24h: number;
changePercent24h: number;
}
export function PriceTicker({
symbol,
price,
change24h,
changePercent24h,
}: PriceTickerProps) {
const isPositive = changePercent24h >= 0;
return (
<div className="flex items-center justify-between p-3 rounded-lg bg-muted/50">
<div className="flex items-center gap-2">
<span className="font-display font-medium">{symbol}</span>
</div>
<div className="flex items-center gap-3">
<AnimatedNumber value={price} prefix="$" decimals={2} />
<span
className={cn(
'text-sm font-mono tabular-nums',
isPositive ? 'text-success' : 'text-destructive'
)}
>
{formatPercentage(changePercent24h)}
</span>
</div>
</div>
);
}
```
---
## Pattern 5: Metric Card with Animation
```tsx
interface MetricCardProps {
label: string;
value: number;
previousValue?: number;
format: 'currency' | 'percent' | 'number';
}
export function MetricCard({
label,
value,
previousValue,
format,
}: MetricCardProps) {
const formatValue = (v: number) => {
switch (format) {
case 'currency': return formatCurrency(v, { compact: true });
case 'percent': return formatPercentage(v);
case 'number': return formatNumber(v, { compact: true });
}
};
const change = previousValue ? ((value - previousValue) / previousValue) * 100 : null;
return (
<Surface layer="metric" className="p-4">
<div className="text-xs uppercase tracking-wider text-muted-foreground mb-1">
{label}
</div>
<div className="text-2xl font-bold font-mono tabular-nums">
<FlashingValue value={value} formatter={formatValue} />
</div>
{change !== null && (
<div className={cn(
'text-xs font-mono mt-1',
change >= 0 ? 'text-success' : 'text-destructive'
)}>
{formatPercentage(change)} from previous
</div>
)}
</Surface>
);
}
```
---
## Pattern 6: CSS Value Flash Animation
```css
@keyframes value-flash-up {
0% {
color: hsl(var(--success));
text-shadow: 0 0 8px hsl(var(--success) / 0.5);
}
100% {
color: inherit;
text-shadow: none;
}
}
@keyframes value-flash-down {
0% {
color: hsl(var(--destructive));
text-shadow: 0 0 8px hsl(var(--destructive) / 0.5);
}
100% {
color: inherit;
text-shadow: none;
}
}
.animate-flash-up {
animation: value-flash-up 0.6s ease-out;
}
.animate-flash-down {
animation: value-flash-down 0.6s ease-out;
}
```
---
## Related Skills
- **Meta-skill:** [ai/skills/meta/design-system-creation/](../../meta/design-system-creation/) — Complete design system workflow
- [financial-data-visualization](../financial-data-visualization/) — Chart theming and data visualization
- [realtime-react-hooks](../../realtime/realtime-react-hooks/) — Real-time data hooks for live updates
---
## NEVER Do
- **Skip tabular-nums** — Numbers will jump as they change
- **Use linear animations** — Spring/ease-out feels more natural
- **Animate decimals rapidly** — Too much motion is distracting
- **Forget compact formatting** — Large numbers need abbreviation
- **Show raw floats** — Always format with appropriate precision
- **Flash on every render** — Only flash on actual value changes
---
## Typography for Numbers
```css
.metric {
font-family: var(--font-mono);
font-variant-numeric: tabular-nums;
font-weight: 600;
letter-spacing: -0.02em;
}
.price-large {
font-size: 2rem;
font-weight: 800;
}
.percentage {
font-size: 0.875rem;
font-weight: 500;
}
```
ContextWeave 架构图一键生成
用 Nano Banana Pro 生成或编辑图片的脚本技能。
用 whisper 命令行在本地把音频转写成文字或做翻译的技能。
通过 MCP 服务生成与编辑图表的技能。
面向界面设计的思路与落地建议技能,覆盖布局、交互流程、设计令牌与前端改动。
面向多家视频模型 API 的 AI 视频生成与编排技能。
用 ffmpeg 从视频里取出画面帧,或生成便于快速查看的缩略图。
用本地 Whisper 把音频文件转成文字,模型下载完成后可完全离线运行。
按维度逐项检查代码质量与安全的评审技能。
e2e-testing-patterns 汇集 Playwright 与 Cypress 的关键用户流程测试模式。
UI Design:提供界面布局、字体、色彩、间距、无障碍和组件设计指导。
给代码质量立规矩的技能。
用 Mermaid 文本语法绘制可版本管理的软件图表。
数据月份:2026-09 · 下载/星标/安装数聚合自公开技能注册库(ClawHub、SkillHub),按月更新。口径说明见数据方法。