DocsSupportPricing
Roadmap (has updates coming soon)XFigma3.7K
Sign inGet All-Access
Categories
Area Chart3
Bar Chart14
Composed Chart5
Line Chart6
  • Balance Tracker
  • Metric Switcher
  • Revenue Trend
  • Social Engagement
  • Sales vs Traffic
  • NFT Floor Price
Pie Chart2
Radial Chart3
Sparkline11
Status Tracker3

For AI Agents

Hand your agent this brief or the ReUI MCP, not a screenshot. Installs with a ReUI Pro or Ultimate license.

Best for: A row of 4 KPI toggle buttons that redraw one dashed line with pulsing points, each change computed against the prior value

When to use

  • A balance, price or revenue trend as a single stroke with period tabs and a peak marker
  • Several platforms or channels compared as separate strokes on one time axis
  • Two measures on different scales plotted against left and right axes

When not to use

  • A whole call analytics page with 6 metric buttons, ranked agents and integrations: use the Voice Agent Calls block
  • One metric studied in depth against a target, with a cohort breakdown and a changes log: use the Metric Deep Dive block
  • A trend that needs its volume emphasized with a filled region below it: use the Area Chart blocks
  • Compact tiles where each figure carries a small trend of its own: use the Sparkline blocks

Agent notes

  • Each metrics entry's key must name a column of platformData, since the active key becomes the Line dataKey
  • Headline value and prev are typed apart from platformData; set inv on metrics where a drop is good news, as on Response
  • The XAxis tickFormatter parses each ISO date as UTC midnight, so west of UTC every tick shows the previous day
  • Each stroke takes its label and color from a chartConfig key passed to ChartContainer, so add a key for every new series
Markdownhttps://reui.io/blocks/chart/line-chart/chart-6.md
MCPget_block("chart-6")
Installnpx shadcn@latest add @reui/chart-6
Full index for agents:llms.txtReUI MCP setup

Shadcn Components in the Metric Switcher Block

  • BadgeReUI
  • Button
  • FrameReUI

Dependencies

  • cn
  • recharts

Shadcn Metric Switcher Block

Metric-switcher line chart card with clickable KPI tabs and pulsing animated dots. Part of the ReUI Shadcn Line Chart blocks collection.

Platform analytics card where four KPI tabs (orders, response, revenue, users) with percent-change badges switch a single dashed line series. ReUI Frame, Badge, shadcn Button, ChartContainer, recharts LineChart. Metrics dashboard, trend chart.

It is composed from Badge, Button, Frame, so every part of it is a primitive you can restyle with your own design tokens.

What You Can Build With the Metric Switcher Block

  • Install it with the ReUI registry command in the toolbar above, then swap the placeholder content, data wiring, and business logic for your own.
  • Compare it across all eight ReUI styles and both the Base UI and Radix bases in the customizer before committing to one direction.
  • Combine it with the other Shadcn Line Chart blocks to assemble a full screen instead of a single section.

All Shadcn Line Chart Blocks

The rest of this category, each on its own page with a live preview, the components it is built from, and the install command.

  • Balance Tracker Account Balance Line Chart with Reference Line, Peak Dots and Stat Header
  • Revenue Trend Revenue performance card with line chart and period tabs (5D / 2W / 1M)
  • Social Engagement Multi-line social media activity chart with platform comparison and time-range selector
  • Sales vs Traffic Dual-axis e-commerce sales vs views line chart with period selector and KPI trend badges
  • NFT Floor Price Dark floor price analytics card with period tabs and monotone line chart

Related Shadcn Charts Block Categories

  • Area Chart (3) Area chart cards with gradient fills, stacked series, period tabs and hover tooltips for trends over time.
  • Bar Chart (14) Bar and column charts, grouped and stacked bars, lollipop stems and segmented bar meters for comparing values.
  • Composed Chart (5) Composed charts that layer areas and lines on one axis, with reference lines, goals and release markers.
  • Pie Chart (2) Pie and donut chart cards with center totals, per-segment legends and period tabs for share of a whole.
  • Radial Chart (3) Radial gauges with semicircle and full arcs, segmented rings and status labels for progress toward a target.
  • Sparkline (11) KPI tiles and metric lists where each value pairs with a small line, area or bar sparkline and a delta.

All Shadcn Block Groups

Browse the full ReUI Shadcn blocks library by product surface. Each group bundles category-level blocks you can mix and match across your project.

  • Shadcn Application Blocks (301) Browse 301 Shadcn Application blocks across 23 categories.
  • Shadcn Data Grid Blocks (42) Browse 42 Shadcn Data Grid blocks across 9 categories.
  • Shadcn Charts Blocks (47) Browse 47 Shadcn Charts blocks across 8 categories.
  • Shadcn Solutions Blocks (74) Browse 74 Shadcn Solutions blocks across 10 categories.
  • Shadcn AI & Agents Blocks (18) Browse 18 Shadcn AI & Agents blocks across 2 categories.
  • Shadcn eCommerce Blocks (87) Browse 87 Shadcn eCommerce blocks across 13 categories.
  • Shadcn Marketing Blocks (67) Browse 67 Shadcn Marketing blocks across 8 categories.

Frequently Asked Questions

When should I use the Metric Switcher block?

Use it for a row of 4 KPI toggle buttons that redraw one dashed line with pulsing points, each change computed against the prior value.

The Line Chart category fits:

  • A balance, price or revenue trend as a single stroke with period tabs and a peak marker
  • Several platforms or channels compared as separate strokes on one time axis
  • Two measures on different scales plotted against left and right axes

For a whole call analytics page with 6 metric buttons, ranked agents and integrations, use the Voice Agent Calls block. For one metric studied in depth against a target, with a cohort breakdown and a changes log, use the Metric Deep Dive block. For a trend that needs its volume emphasized with a filled region below it, use the Area Chart blocks. For compact tiles where each figure carries a small trend of its own, use the Sparkline blocks.

What is the Metric Switcher block built with?

Metric Switcher uses Badge, Button, Frame. Installing the block through the ReUI registry pulls those dependencies in for you.

Can I restyle the Metric Switcher block?

Yes. It reads your design tokens, so switching style, radius, base color, font, or icon library in the customizer restyles it without touching the markup.

How should I use Shadcn line chart blocks in a real project?

Treat them as structured starting points. Keep the layout, hierarchy, and interaction ideas that work, then replace placeholder content, data wiring, and business logic with your own product requirements.
PreviousBalance TrackerNextRevenue Trend

Start building with ReUI Pro today.

Every Pro block, every style, and every future addition, with one license for unlimited projects.

Get All-Access

From $249, once. Lifetime updates.

Application

  • App ShellAdded 4 new App Shell blocks
  • Auth
  • Card
  • Dashboard
  • Dialog
  • Empty State
  • Event Calendar
  • Flow
  • Form
  • Gantt
  • Kanban Board
  • List
  • Navbar
  • Onboarding
  • Profile
  • Rich Text Editor
  • Schedule
  • Settings
  • Sheet
  • Stats
  • Timeline
  • Whiteboard
  • Wizard

Data Grid

  • Base
  • AdvancedNew Advanced category with 3 Data Grid blocks
  • Columns
  • Drag & Drop
  • Editing
  • Expansion
  • Filtering
  • Grouping
  • Virtualization

Charts

  • Area Chart
  • Bar Chart
  • Composed Chart
  • Line Chart
  • Pie Chart
  • Radial Chart
  • Sparkline
  • Status Tracker

AI & Agents

  • AI Chat
  • Agent Activity

Solutions

  • Dev Ops
  • AI Ops
  • CRM
  • Agents
  • Analytics
  • Billing
  • Bookings
  • Files
  • Inventory
  • Users

Templates

  • E-commerce
  • SaaS
  • Dashboard
  • Landing
  • All templates

eCommerce

  • Category Card
  • Checkout
  • Comparison
  • Coupon
  • Filter Sidebar
  • Product Card
  • Product Detail
  • Product Grid
  • Receipt
  • Review
  • Shopping Cart
  • Wishlist
  • Shop Hero

Marketing

  • Blog
  • Compare
  • Contact
  • CTA
  • FAQ
  • Hero
  • How It Works
  • Pricing

Resources

  • Components
  • Blocks
  • Icons
  • MCP for Agents
  • Docs
  • Support
  • Pricing
  • Tailwind Plus Alternative
  • Roadmap(has updates coming soon)
  • AffiliateSoon

Legal

  • Privacy Policy
  • Terms & Conditions
  • License
  • Refunds
  • Cookies

© 2026 ReUI. All rights reserved.

3.7K
  1. Blocks
  2. Charts
  3. Line Chart
  4. Metric Switcher
MarkdownShare

Shadcn Metric Switcher

Platform analytics card where four KPI tabs (orders, response, revenue, users) with percent-change badges switch a single dashed line series. ReUI Frame, Badge, shadcn Button, ChartContainer, recharts LineChart. Metrics dashboard, trend chart.