noahgdev

Delta Badge

Dashboards

About

A small badge showing a signed percentage change with a trend icon, colored by whether the change is good. Every card in this registry uses it, and it can be inverted for metrics where a decrease is the good direction.

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

Code

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

Usage.tsx

import { DeltaBadge } from "@/components/ui/dashboardcn-delta-badge"

export default function DeltaBadgeDemo() {
  return (
    <div className="flex flex-col gap-4">
      <div className="flex flex-wrap items-center gap-3">
        <DeltaBadge delta={0.124} />
        <DeltaBadge delta={-0.032} />
        <DeltaBadge delta={0} />
        <DeltaBadge delta={0.08} invert />
      </div>
      <div className="flex flex-wrap items-center gap-3">
        <DeltaBadge delta={0.124} variant="soft" />
        <DeltaBadge delta={-0.032} variant="soft" />
        <DeltaBadge delta={0} variant="soft" />
      </div>
      <div className="flex flex-wrap items-center gap-3">
        <DeltaBadge delta={0.124} variant="text" />
        <DeltaBadge delta={-0.032} variant="text" showIcon={false} />
      </div>
    </div>
  )
}

Dependencies

More by noahgdev

View all
  • Donut Chart

    Donut Chart

    1
  • Metric List

    Metric List

  • Sankey Chart

    Sankey Chart

  • Scatter Chart

    Scatter Chart

  • Radar Chart

    Radar Chart

  • Composed Chart

    Composed Chart

  • Bar Chart

    Bar Chart

  • Funnel Chart

    Funnel Chart

More in Dashboards

View all
  • Fernly — Project Management Dashboard with Kanban

    Fernly — Project Management Dashboard with Kanban

    659
  • Analytics Dashboard

    Analytics Dashboard

    59
  • Creator Dashboard

    Creator Dashboard

    208
  • Insights Dashboard

    Insights Dashboard

    35
  • serf dashboard

    serf dashboard

    137
  • Corbel — Sales Analytics Dashboard

    Corbel — Sales Analytics Dashboard

    293
  • Dashboard with Collapsible Sidebar

    Dashboard with Collapsible Sidebar

    2.7K
  • Business/Sales Dashboard

    Business/Sales Dashboard

    1.5K