Skip to content

NewMCP server for your coding agent. Set it up ›

Nexus UI
Get Pro

Pulse Dashboard KPIs, animated React component

A row of KPI cards with a period switcher. Switching period morphs every sparkline into its new shape on a spring, rolls each figure to its new value and flips the delta chips, which know when a drop is good news.

  • Free
  • Dashboards
  • Spring
  • Hover

Like Pulse Dashboard KPIs? 256 more are in Pro.

Pro unlocks all 256 Pro components, every template and block, and everything we release next. Pulse Dashboard KPIs stays free.

Play with it

Move the controls and watch it change. Copy code gives you a snippet with only the props you changed.

This week at a glance

Activation

4.1%

64.2%, up 4.1%, good

Net revenue

12.4%

$48.9k, up 12.4%, good

p95 latency

9.6%

182ms, down 9.6%, good

Switch the period; every line morphs to its new shape.

Props

PropTypeDefaultWhat it does
kpis—Metrics to show: label, value, delta, lowerIsBetter, trend.
periods—Named periods with their own metrics; adds a period switcher. Used by default when kpis is not passed.
defaultPeriod—Period selected first.
onPeriodChange—Called when the user switches period.
title"This week at a glance"Heading above the strip.
autoplayfalseCycles through the periods every 2.8s until someone touches the strip.
className—Extra classes on the section.

Add it to your project

  1. 1

    Set up your project once

    You need a Next.js project with Tailwind CSS and the @/ import alias. In its root folder, run this once. It creates components.json and the cn() helper in src/lib/utils.ts:

    npx shadcn@latest init -d

    Starting from nothing? The Quick Start walks through the whole thing.

  2. 2

    Connect the registry

    Run this once per project. It writes the Nexus UI entry into components.json for you:

    npx shadcn@latest registry add "@nexus-labs=https://www.nexus-ui.com/api/registry/{name}"

    Type it exactly as shown. {name} is filled in by the CLI with the component you ask for, so you never replace it.

  1. 3

    Add the component

    Run this from your project root. It adds the component, the helpers it imports and its npm packages.

    npx shadcn@latest add @nexus-labs/pulse-dashboard-kpis
  2. 4

    Check what was added

    With a project made as in the Quick Start (a src/ folder), these files land in it:

    components/
    pulse-dashboard-kpis/
    index.ts
    pulse-dashboard-kpis.tsx
  3. 5

    Copying by hand? Skip the registry

    Instead of steps 2 and 3 you can copy the files yourself, with no registry and no API key. Step 1 still applies, so that cn() exists. Install the packages:

    npm install framer-motion

    Then show the source and create each file at the path it gives:

  4. 6

    Use it in a page

    Installing only adds the files. Import the component in a page and render it. The Usage tab on the preview shows a fuller example with props:

    // src/app/page.tsx
    import { KpiStrip, type Kpi } from "@/components/pulse-dashboard-kpis";
    
    export default function Page() {
      return (
        <main>
          <KpiStrip />
        </main>
      );
    }

Like Pulse Dashboard KPIs? 256 more are in Pro.

Pro unlocks all 256 Pro components, every template and block, and everything we release next. Pulse Dashboard KPIs stays free.

About Pulse Dashboard KPIs

Pulse Dashboard KPIs renders a strip of metric cards with micro-hover lift animations and soft chart placeholder visualizations. Each card elevates with spring physics on hover and accepts a value, label, trend direction, and sparkline slot. The component is used both on marketing pages to preview product capabilities and inside actual dashboard UIs to display real-time metrics. The layout adapts from a scrollable row on mobile to a multi-column grid on desktop.

Good for

  • Product feature preview sections
  • SaaS dashboard KPI strips
  • Analytics tool marketing pages
  • Metrics showcase components

Pulse Dashboard KPIs questions

How do I install the KPI cards?

Run `npx shadcn@latest add @nexus-labs/pulse-dashboard-kpis`. It installs framer-motion and lucide-react.

How do I pass my own metrics?

Pass `kpis` as an array of `{ label, value, delta?, lowerIsBetter?, trend? }`. To get the period switcher, pass `periods` instead, a record such as `{ "7d": [...], "30d": [...] }`, and pick the first one with `defaultPeriod`.

Does it need a chart library?

No. Each sparkline is an inline SVG path built from the `trend` numbers and drawn in with Framer Motion. It is green when the change is good and red when it is bad, so latency or churn can use `lowerIsBetter`.

Does it support dark mode and reduced motion?

Yes. It is styled with Tailwind `dark:` variants, and with prefers-reduced-motion on, the sparkline draw-in, hover lift and switcher slide are skipped.