animated-financial-display
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.
Best use case
animated-financial-display is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
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.
Teams using animated-financial-display should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/animated-financial-display/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How animated-financial-display Compares
| Feature / Agent | animated-financial-display | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
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.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Animated Financial Display
Create engaging financial number displays with smooth animations, proper formatting, and visual feedback on value changes.
## Installation
### OpenClaw / Moltbot / Clawbot
```bash
npx clawhub@latest install animated-financial-display
```
---
## 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;
}
```Related Skills
financial-data-visualization
Patterns for building dark-themed financial charts and data visualizations. Covers chart theming, color scales for gains/losses, and real-time data display. Use when building trading dashboards or financial analytics. Triggers on chart theme, data visualization, financial chart, dark theme, gains losses, trading UI.
schema-markup
Add, fix, or optimize schema markup and structured data. Use when the user mentions schema markup, structured data, JSON-LD, rich snippets, schema.org, FAQ schema, product schema, review schema, or breadcrumb schema.
prompt-engineering
Master advanced prompt engineering techniques to maximize LLM performance, reliability, and controllability in production. Use when optimizing prompts, improving LLM outputs, designing production prompt templates, or building AI-powered features.
professional-communication
Write effective professional messages for software teams. Use when drafting emails, Slack/Teams messages, meeting agendas, status updates, or translating technical concepts for non-technical audiences. Triggers on email, slack, teams, message, meeting agenda, status update, stakeholder communication, escalation, jargon translation.
persona-docs
Create persona documentation for a product or codebase. Use when asked to create persona docs, document target users, define user journeys, document onboarding flows, or when starting a new product and needing to define its audience. Persona docs should be the first documentation created for any product.
mermaid-diagrams
Create software diagrams using Mermaid syntax. Use when users need to create, visualize, or document software through diagrams including class diagrams, sequence diagrams, flowcharts, ERDs, C4 architecture diagrams, state diagrams, git graphs, and other diagram types. Triggers include requests to diagram, visualize, model, map out, or show the flow of a system.
game-changing-features
Find 10x product opportunities and high-leverage improvements. Use when the user wants strategic product thinking, mentions 10x, wants to find high-impact features, or asks what would make a product dramatically more valuable.
clear-writing
Write clear, concise prose for humans — documentation, READMEs, API docs, commit messages, error messages, UI text, reports, and explanations. Combines Strunk's rules for clearer prose with technical documentation patterns, structure templates, and review checklists.
brainstorming
Explore ideas before implementation through collaborative dialogue. Use before any creative work — creating features, building components, adding functionality, or modifying behavior. Turns ideas into fully formed designs and specs through structured conversation.
Article Illustrator
When the user wants to add illustrations to an article or blog post. Triggers on: "illustrate article", "add images to article", "generate illustrations", "article images", or requests to visually enhance written content. Analyzes article structure, identifies positions for visual aids, and generates illustrations using a Type x Style two-dimension approach.
subagent-driven-development
Execute implementation plans by dispatching a fresh subagent per task with two-stage review (spec compliance then code quality). Use when you have an implementation plan with mostly independent tasks and want high-quality, fast iteration within a single session.
skill-judge
Evaluate Agent Skill quality against official specifications. Use when reviewing SKILL.md files, auditing skill packages, improving skill design, or checking if a skill follows best practices. Provides 8-dimension scoring (120 points) with actionable improvements. Triggers on review skill, evaluate skill, audit skill, improve skill, skill quality, SKILL.md review.