# Marketing Stat: Sparkline Stats

Stat cards that pair a current value with a tiny inline trend chart. Use it to show a number and its recent direction together on a dashboard view.

- Page: https://www.shadcn-ui-blocks.com/blocks/marketing/stats/sparkline-stats
- Collection: [Marketing](https://www.shadcn-ui-blocks.com/blocks/marketing), Free tier
- Group: [Stats](https://www.shadcn-ui-blocks.com/blocks/marketing/stats)
- Created: 2026-06-14
- Preview image: https://www.shadcn-ui-blocks.com/blocks/marketing/stats/sparkline-stats.png

## Install

```bash
npx shadcn@latest add @shadcn-ui-blocks/marketing-stats-sparkline-stats
```

A free block: it installs with no account or key. Or install it by URL: `npx shadcn@latest add "https://www.shadcn-ui-blocks.com/r/marketing-stats-sparkline-stats.json"`.

## Depends on

- npm packages: class-variance-authority, lucide-react, radix-ui
- shadcn/ui components: badge, card, select
- Installs to: `@/components/blocks/marketing/stats/sparkline-stats`

## About this block

Sparkline Stats opens with a centered heading area that carries a badge,
a bold title, and a short description paragraph. Below that sits a time
range control: a segmented button group on wider screens and a dropdown
select on small screens, letting visitors switch between daily, weekly,
monthly, and quarterly views without a page reload. Beneath the control
a four column grid renders one card per metric. Each card shows a metric
name, a large current value, a delta figure, a percentage change with a
directional arrow and a comparison label, and a filled SVG sparkline
that traces the selected period point by point.

The four metrics and all their underlying data sets are fully
replaceable. You can swap in any labels and figures that fit your
product, add or remove cards from the grid, and adjust the time range
options to match the cadences that matter to your audience. The heading
copy, badge text, and comparison labels ("last month", "last week") are
plain strings you can reword freely.

## When to use

Reach for this block when you need to show both a snapshot number and
its recent direction at the same time. For a creative agency or studio
it is a natural fit on a client results page or an internal performance
dashboard embedded in a case study, where showing utilization,
deliverables shipped, or campaign reach across selectable periods tells
a richer story than a single static figure. It outperforms a plain stat
strip when the trend matters as much as the current value, and it
outperforms a full chart section when four metrics need to sit side by
side without visual clutter.

A natural flow around it on a Marketing (Legacy) page:

**Before**

- A [hero section](https://www.shadcn-ui-blocks.com/blocks/marketing/hero-sections) to establish the
  product or campaign before jumping to numbers
- [Customer Testimonial](https://www.shadcn-ui-blocks.com/blocks/marketing/stats/customer-testimonial)
  to pair a client quote with the metrics they drove

**After**

- A [feature section](https://www.shadcn-ui-blocks.com/blocks/marketing/feature-sections) that unpacks
  what is behind the numbers
- A [CTA section](https://www.shadcn-ui-blocks.com/blocks/marketing/cta-sections) to convert the
  credibility the stats have built

## What you can display

Any set of four metrics that each have a current value and a history of
data points will slot in cleanly. A few directions that work well:

- **Campaign performance.** Drop in impressions, click rate, conversions,
  and cost per acquisition to give clients a quick read on a live
  campaign across any window of time.
- **Content output tracking.** Surface deliverables published, average
  engagement rate, new followers, and hours logged to show a studio's
  productivity at a glance.
- **Revenue indicators.** Show monthly recurring revenue, new contracts,
  average project value, and churn rate so stakeholders can scan
  financial health without opening a separate report.

> Tip: pick one metric where a falling number is the goal (like bounce
> rate or churn) so the block's built-in inverse coloring gets used and
> readers see green on improvement naturally.

## More in Marketing Stats

- [Achievement Bars](https://www.shadcn-ui-blocks.com/blocks/marketing/stats/achievement-bars)
- [Card Group](https://www.shadcn-ui-blocks.com/blocks/marketing/stats/card-group)
- [Circular Progress](https://www.shadcn-ui-blocks.com/blocks/marketing/stats/circular-progress)
- [Comparison Metrics](https://www.shadcn-ui-blocks.com/blocks/marketing/stats/comparison-metrics)
- [Comparison Stats](https://www.shadcn-ui-blocks.com/blocks/marketing/stats/comparison-stats)
- [Customer Testimonial](https://www.shadcn-ui-blocks.com/blocks/marketing/stats/customer-testimonial)
- [Funnel Stats](https://www.shadcn-ui-blocks.com/blocks/marketing/stats/funnel-stats)
- [Gradient Grid](https://www.shadcn-ui-blocks.com/blocks/marketing/stats/gradient-grid)
- [Growth Timeline](https://www.shadcn-ui-blocks.com/blocks/marketing/stats/growth-timeline)
- [Horizontal With Dividers](https://www.shadcn-ui-blocks.com/blocks/marketing/stats/horizontal-with-dividers)
- [Impact Numbers](https://www.shadcn-ui-blocks.com/blocks/marketing/stats/impact-numbers)
- [Interactive Hover](https://www.shadcn-ui-blocks.com/blocks/marketing/stats/interactive-hover)
- [Metric Cards](https://www.shadcn-ui-blocks.com/blocks/marketing/stats/metric-cards)
- [One Main With Three Follow Ups](https://www.shadcn-ui-blocks.com/blocks/marketing/stats/one-main-with-three-follow-ups)
- [Progress Bars](https://www.shadcn-ui-blocks.com/blocks/marketing/stats/progress-bars)
- [Simple 3 Cols](https://www.shadcn-ui-blocks.com/blocks/marketing/stats/simple-3-cols)
- [Stats With Icons](https://www.shadcn-ui-blocks.com/blocks/marketing/stats/stats-with-icons)
- [Timeline Stats](https://www.shadcn-ui-blocks.com/blocks/marketing/stats/timeline-stats)
- [Trust Indicators](https://www.shadcn-ui-blocks.com/blocks/marketing/stats/trust-indicators)
