Charts
SparkChart
Tiny inline chart โ embeds in metric cards, table cells, and dashboard grids.
Quick Preview
Revenue
$48,290
Churn Rate
2.8%
Active Users
8,142
Installation
npm install recharts
// Copy component fromsrc/components/charts/SparkChart.tsx
Usage
import SparkChart from '@/components/charts/SparkChart'<SparkChartdata={[12, 15, 11, 18, 22, 19, 25]}variant="area"color="#F45A5A"height={48}/>
Examples
Three Variants
Area
Line
Bar
Prompt Preview
Copy a prompt that recreates this UI
Paste this into your AI coding assistant to generate code that closely matches the reference, including color, size, shape, typography, spacing, and polish.
Copy-ready AI prompt
Starts from the current visual reference and project constraints.
Tweak only product-specific copy or data after the first generation pass.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
data* | number[] | { value: number }[] | - | Data series |
variant | 'area' | 'line' | 'bar' | 'area' | Chart type |
color | string | '#F45A5A' | Chart colour |
height | number | 40 | Chart height in px |