joseestevez520

Stat

Dashboards

About

A labeled figure for dashboards that rolls its digits to a new value, shows a trend arrow or percentage, and can draw a hoverable/keyboard-scrubbable sparkline (line or bars) beneath it.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Stat to your project and fits it to your theme.

Code

How Stat is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

import Stat from "@/components/ui/stat";

const weeks = Array.from({ length: 8 }, (_, i) => `Week ${i + 1}`);
const attendance = [0.97, 0.96, 0.95, 0.93, 0.92, 0.94, 0.93, 0.91];

/** Weekly attendance read one bar at a time: the last bar carries the trend's tone, the rest sit
 * quieter, and it still keeps the spring-follow and pointer/keyboard scrub. */
export default function BarsVariantDemo() {
  return (
    <div className="w-80 rounded-xl border border-[color:var(--color-border)] bg-[var(--color-bg,#f5f5f5)] p-6 dark:bg-[#0a0a0a]">
      <Stat
        label="Attendance"
        value={0.91}
        options={{ style: "percent" }}
        trend={-4}
        trendTone="negative"
        series={attendance}
        labels={weeks}
        variant="bars"
        description="Last eight weeks"
      />
    </div>
  );
}

More by joseestevez520

View all
  • Progress Button

    Progress Button

    13
  • Chart

    Chart

    5
  • Icon Morph

    Icon Morph

  • Marquee

    Marquee

  • Day Strip

    Day Strip

  • Prose

    Prose

  • File Drop Zone

    File Drop Zone

More in Dashboards

View all
  • Creator Dashboard

    Creator Dashboard

    94
  • serf dashboard

    serf dashboard

    84
  • Dashboard with Collapsible Sidebar

    Dashboard with Collapsible Sidebar

    2.6K
  • Glass Dashboard

    Glass Dashboard

    1.1K
  • Adjustable Glass Dashboard

    Adjustable Glass Dashboard

    1.2K
  • App Dashboard Layout

    App Dashboard Layout

    572
  • Sidebar

    Sidebar

    422
  • Dashboard Shell

    Dashboard Shell

    215