v1.3.0 28

Stats Card

Displays key metrics and statistics in a compact card format.

Default

Stat cards with label, value, and change indicator.

html

Total Revenue

$45,231

+12.5% from last month

Total Users

2,350

+8.2% from last month

Bounce Rate

24.3%

-3.2% from last month
<div class="vt-grid vt-grid-cols-1 vt-sm:grid-cols-3 vt-gap-4">
  <div class="vt-card vt-stats-card">
    <div class="vt-stats-card-content">
      <p class="vt-stats-card-label">Total Revenue</p>
      <p class="vt-stats-card-value">$45,231</p>
    </div>
    <div class="vt-stats-card-trend">
      <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" class="vt-stats-card-trend-icon" aria-hidden="true">
        <path d="M17.9998 15C17.9998 15 13.5809 9.00001 11.9998 9C10.4187 8.99999 5.99985 15 5.99985 15" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path>
      </svg>
      <span class="vt-stats-card-delta">+12.5%</span>
      <span class="vt-stats-card-note">from last month</span>
    </div>
  </div>
  <div class="vt-card vt-stats-card">
    <div class="vt-stats-card-content">
      <p class="vt-stats-card-label">Total Users</p>
      <p class="vt-stats-card-value">2,350</p>
    </div>
    <div class="vt-stats-card-trend">
      <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" class="vt-stats-card-trend-icon" aria-hidden="true">
        <path d="M17.9998 15C17.9998 15 13.5809 9.00001 11.9998 9C10.4187 8.99999 5.99985 15 5.99985 15" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path>
      </svg>
      <span class="vt-stats-card-delta">+8.2%</span>
      <span class="vt-stats-card-note">from last month</span>
    </div>
  </div>
  <div class="vt-card vt-stats-card vt-stats-card-down">
    <div class="vt-stats-card-content">
      <p class="vt-stats-card-label">Bounce Rate</p>
      <p class="vt-stats-card-value">24.3%</p>
    </div>
    <div class="vt-stats-card-trend">
      <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" class="vt-stats-card-trend-icon" aria-hidden="true">
        <path d="M18 9.00005C18 9.00005 13.5811 15 12 15C10.4188 15 6 9 6 9" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path>
      </svg>
      <span class="vt-stats-card-delta">-3.2%</span>
      <span class="vt-stats-card-note">from last month</span>
    </div>
  </div>
</div>

With Icons

Stat cards with an icon tile beside the value.

html

Revenue

$45,231

+20.1%

Users

2,350

+15.3%

Engagement

68.7%

-2.4%
<div class="vt-grid vt-grid-cols-1 vt-sm:grid-cols-3 vt-gap-4">
  <div class="vt-card vt-stats-card">
    <div class="vt-stats-card-header">
      <div class="vt-stats-card-content">
        <p class="vt-stats-card-label">Revenue</p>
        <p class="vt-stats-card-value">$45,231</p>
      </div>
      <div class="vt-icon-badge vt-icon-badge-square">
        <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" class="vt-icon-badge-icon" aria-hidden="true">
          <path d="M22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M9.14844 15C9.54108 15.9675 10.6694 16.6663 12.0002 16.6663C13.657 16.6663 15.0002 15.975 15.0002 14.2466C15.0002 12.5182 14.0002 11.8268 12.0002 11.8268C10.0002 11.8268 9.25017 11.0892 9.25017 9.75276C9.25017 8.41637 10.4814 7.33301 12.0002 7.33301C13.2203 7.33301 14.2548 8.03217 14.6145 9" stroke="currentColor" stroke-linecap="round" stroke-width="1.5"></path><path d="M12 6L12 18" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path>
        </svg>
      </div>
    </div>
    <div class="vt-stats-card-trend">
      <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" class="vt-stats-card-trend-icon" aria-hidden="true">
        <path d="M17.9998 15C17.9998 15 13.5809 9.00001 11.9998 9C10.4187 8.99999 5.99985 15 5.99985 15" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path>
      </svg>
      <span class="vt-stats-card-delta">+20.1%</span>
    </div>
  </div>
  <div class="vt-card vt-stats-card">
    <div class="vt-stats-card-header">
      <div class="vt-stats-card-content">
        <p class="vt-stats-card-label">Users</p>
        <p class="vt-stats-card-value">2,350</p>
      </div>
      <div class="vt-icon-badge vt-icon-badge-square">
        <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" class="vt-icon-badge-icon" aria-hidden="true">
          <path d="M16.5 20V16.9852C16.5 16.364 16.2184 15.7658 15.6838 15.4494C14.1574 14.546 12.1714 14 10 14C7.82863 14 5.84261 14.546 4.31618 15.4494C3.78162 15.7658 3.5 16.364 3.5 16.9852V20" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><circle cx="10" cy="7.5" r="3.5" stroke="currentColor" stroke-width="1.5"></circle><path d="M20.5 20.001V16.9862C20.5 16.365 20.2184 15.7667 19.6838 15.4504C19.171 15.1468 18.6062 14.8837 18 14.668" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M15 4.14453C16.4457 4.57481 17.5 5.91408 17.5 7.49959C17.5 9.0851 16.4457 10.4244 15 10.8547" stroke="currentColor" stroke-linecap="round" stroke-width="1.5"></path>
        </svg>
      </div>
    </div>
    <div class="vt-stats-card-trend">
      <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" class="vt-stats-card-trend-icon" aria-hidden="true">
        <path d="M17.9998 15C17.9998 15 13.5809 9.00001 11.9998 9C10.4187 8.99999 5.99985 15 5.99985 15" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path>
      </svg>
      <span class="vt-stats-card-delta">+15.3%</span>
    </div>
  </div>
  <div class="vt-card vt-stats-card vt-stats-card-down">
    <div class="vt-stats-card-header">
      <div class="vt-stats-card-content">
        <p class="vt-stats-card-label">Engagement</p>
        <p class="vt-stats-card-value">68.7%</p>
      </div>
      <div class="vt-icon-badge vt-icon-badge-square">
        <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" class="vt-icon-badge-icon" aria-hidden="true">
          <path d="M3 17L7 13C7.88256 12.1174 8.32385 11.6762 8.86543 11.6274C8.95496 11.6193 9.04504 11.6193 9.13457 11.6274C9.67615 11.6762 10.1174 12.1174 11 13C11.8826 13.8826 12.3238 14.3238 12.8654 14.3726C12.955 14.3807 13.045 14.3807 13.1346 14.3726C13.6762 14.3238 14.1174 13.8826 15 13L20 8" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M16 7.27657C16 7.27657 20.101 6.65426 20.7234 7.27661C21.3458 7.89896 20.7234 12 20.7234 12" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path>
        </svg>
      </div>
    </div>
    <div class="vt-stats-card-trend">
      <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" class="vt-stats-card-trend-icon" aria-hidden="true">
        <path d="M18 9.00005C18 9.00005 13.5811 15 12 15C10.4188 15 6 9 6 9" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path>
      </svg>
      <span class="vt-stats-card-delta">-2.4%</span>
    </div>
  </div>
</div>

Compact

Smaller stat cards in a 4-column layout for dashboards.

html

Revenue

$12.4k

+12.5%

Orders

1,463

+8.2%

Customers

894

-3.1%

Avg. Value

$84.50

+4.6%
<div class="vt-grid vt-grid-cols-2 vt-sm:grid-cols-4 vt-gap-3">
  <div class="vt-card vt-stats-card vt-stats-card-sm">
    <div class="vt-stats-card-content">
      <p class="vt-stats-card-label">Revenue</p>
      <p class="vt-stats-card-value">$12.4k</p>
    </div>
    <div class="vt-stats-card-trend">
      <span class="vt-stats-card-delta">+12.5%</span>
    </div>
  </div>
  <div class="vt-card vt-stats-card vt-stats-card-sm">
    <div class="vt-stats-card-content">
      <p class="vt-stats-card-label">Orders</p>
      <p class="vt-stats-card-value">1,463</p>
    </div>
    <div class="vt-stats-card-trend">
      <span class="vt-stats-card-delta">+8.2%</span>
    </div>
  </div>
  <div class="vt-card vt-stats-card vt-stats-card-down vt-stats-card-sm">
    <div class="vt-stats-card-content">
      <p class="vt-stats-card-label">Customers</p>
      <p class="vt-stats-card-value">894</p>
    </div>
    <div class="vt-stats-card-trend">
      <span class="vt-stats-card-delta">-3.1%</span>
    </div>
  </div>
  <div class="vt-card vt-stats-card vt-stats-card-sm">
    <div class="vt-stats-card-content">
      <p class="vt-stats-card-label">Avg. Value</p>
      <p class="vt-stats-card-value">$84.50</p>
    </div>
    <div class="vt-stats-card-trend">
      <span class="vt-stats-card-delta">+4.6%</span>
    </div>
  </div>
</div>

With Sparkline

Stat cards with a small inline SVG sparkline in the trend color.

html

Revenue

$45,231

+20.1%

Users

2,350

+15.3%

Bounce Rate

24.3%

-3.2%
<div class="vt-grid vt-grid-cols-1 vt-sm:grid-cols-3 vt-gap-4">
  <div class="vt-card vt-stats-card">
    <div class="vt-stats-card-content">
      <p class="vt-stats-card-label">Revenue</p>
      <p class="vt-stats-card-value">$45,231</p>
    </div>
    <svg class="vt-stats-card-chart" viewBox="0 0 120 40" fill="none" preserveAspectRatio="none" aria-hidden="true">
      <polyline points="0,35 10,30 20,32 30,25 40,28 50,20 60,22 70,15 80,18 90,10 100,12 110,5 120,8" stroke="currentColor" stroke-width="2" fill="none" stroke-linecap="round" stroke-linejoin="round"></polyline>
      <polyline points="0,35 10,30 20,32 30,25 40,28 50,20 60,22 70,15 80,18 90,10 100,12 110,5 120,8 120,40 0,40" fill="currentColor" fill-opacity="0.1" stroke="none"></polyline>
    </svg>
    <div class="vt-stats-card-trend">
      <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" class="vt-stats-card-trend-icon" aria-hidden="true">
        <path d="M17.9998 15C17.9998 15 13.5809 9.00001 11.9998 9C10.4187 8.99999 5.99985 15 5.99985 15" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path>
      </svg>
      <span class="vt-stats-card-delta">+20.1%</span>
    </div>
  </div>
  <div class="vt-card vt-stats-card">
    <div class="vt-stats-card-content">
      <p class="vt-stats-card-label">Users</p>
      <p class="vt-stats-card-value">2,350</p>
    </div>
    <svg class="vt-stats-card-chart" viewBox="0 0 120 40" fill="none" preserveAspectRatio="none" aria-hidden="true">
      <polyline points="0,30 10,28 20,25 30,27 40,20 50,22 60,18 70,20 80,15 90,17 100,12 110,10 120,8" stroke="currentColor" stroke-width="2" fill="none" stroke-linecap="round" stroke-linejoin="round"></polyline>
      <polyline points="0,30 10,28 20,25 30,27 40,20 50,22 60,18 70,20 80,15 90,17 100,12 110,10 120,8 120,40 0,40" fill="currentColor" fill-opacity="0.1" stroke="none"></polyline>
    </svg>
    <div class="vt-stats-card-trend">
      <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" class="vt-stats-card-trend-icon" aria-hidden="true">
        <path d="M17.9998 15C17.9998 15 13.5809 9.00001 11.9998 9C10.4187 8.99999 5.99985 15 5.99985 15" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path>
      </svg>
      <span class="vt-stats-card-delta">+15.3%</span>
    </div>
  </div>
  <div class="vt-card vt-stats-card vt-stats-card-down">
    <div class="vt-stats-card-content">
      <p class="vt-stats-card-label">Bounce Rate</p>
      <p class="vt-stats-card-value">24.3%</p>
    </div>
    <svg class="vt-stats-card-chart" viewBox="0 0 120 40" fill="none" preserveAspectRatio="none" aria-hidden="true">
      <polyline points="0,10 10,12 20,15 30,13 40,18 50,16 60,22 70,20 80,25 90,23 100,28 110,30 120,32" stroke="currentColor" stroke-width="2" fill="none" stroke-linecap="round" stroke-linejoin="round"></polyline>
      <polyline points="0,10 10,12 20,15 30,13 40,18 50,16 60,22 70,20 80,25 90,23 100,28 110,30 120,32 120,40 0,40" fill="currentColor" fill-opacity="0.1" stroke="none"></polyline>
    </svg>
    <div class="vt-stats-card-trend">
      <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" class="vt-stats-card-trend-icon" aria-hidden="true">
        <path d="M18 9.00005C18 9.00005 13.5811 15 12 15C10.4188 15 6 9 6 9" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path>
      </svg>
      <span class="vt-stats-card-delta">-3.2%</span>
    </div>
  </div>
</div>

With Progress

Stat cards with a progress bar showing completion.

html

Storage Used

75%

7.5 GB of 10 GB

Tasks Complete

42%

21 of 50 tasks

Monthly Goal

92%

$46k of $50k

<div class="vt-grid vt-grid-cols-1 vt-sm:grid-cols-3 vt-gap-4">
  <div class="vt-card vt-stats-card">
    <div class="vt-stats-card-content">
      <p class="vt-stats-card-label">Storage Used</p>
      <p class="vt-stats-card-value">75%</p>
      <p class="vt-stats-card-note">7.5 GB of 10 GB</p>
    </div>
    <div class="vt-progress" data-vt-progress="75">
      <div class="vt-progress-bar"></div>
    </div>
  </div>
  <div class="vt-card vt-stats-card">
    <div class="vt-stats-card-content">
      <p class="vt-stats-card-label">Tasks Complete</p>
      <p class="vt-stats-card-value">42%</p>
      <p class="vt-stats-card-note">21 of 50 tasks</p>
    </div>
    <div class="vt-progress" data-vt-progress="42">
      <div class="vt-progress-bar"></div>
    </div>
  </div>
  <div class="vt-card vt-stats-card">
    <div class="vt-stats-card-content">
      <p class="vt-stats-card-label">Monthly Goal</p>
      <p class="vt-stats-card-value">92%</p>
      <p class="vt-stats-card-note">$46k of $50k</p>
    </div>
    <div class="vt-progress" data-vt-progress="92">
      <div class="vt-progress-bar"></div>
    </div>
  </div>
</div>

Guidelines

Total Revenue

$45,231

+12.5%
Do Lead with a muted label, then a bold value and a trend line.

Total Revenue

$45,231

Don't Don't make the label louder than the value it describes.

API Reference

Class Type Description
vt-cardvt-stats-card Base A card surface laid out as a column, 8px apart, 24px padding
vt-stats-card-sm Size Compact card — 16px padding, 4px apart, Caption label, Heading/SM value
vt-stats-card-down Trend Bad news: arrow, delta and sparkline in danger-text. Without it the trend is good news, in success-text
vt-stats-card-header Part Row: the content and an icon tile at the end
vt-stats-card-content Part Label, value and an optional note, 4px apart
vt-stats-card-label Part Muted Body/SM label
vt-stats-card-value Part Heading/MD value
vt-icon-badgevt-icon-badge-square Part Optional icon tile (IconBadge, 40px)
vt-stats-card-trend Part Row: arrow, delta and note, 4px apart
vt-stats-card-trend-icon Part 16px arrow in the trend color
vt-stats-card-delta Part Label/SM change in the trend color
vt-stats-card-note Part Muted Caption — "from last month", "7.5 GB of 10 GB"
vt-stats-card-chart Part Sparkline svg, full width, 40px tall, drawn in currentColor
vt-progress Part Progress bar (Progress component)

Accessibility

Feature Details
Semantics Use dl/dt/dd elements for label-value pairs in stat cards
Updates Dynamic stat values should use aria-live="polite" for announcements
Icons Decorative trend icons should have aria-hidden="true"
Context Trend indicators need sr-only text like "Increased by 12%"