ganapativs

Trend Arrow

Component

About

A tiny SVG direction glyph (up/down/flat arrow) for showing whether a metric moved, with an optional noise-floor band and formatted value label for table cells and dashboards.

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

Code

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

Usage.tsx

import { TrendArrow } from "@/components/ui/trend-arrow";

export default function TrendArrowEdgeCasesDemo() {
  return (
    <div className="flex min-h-32 items-center justify-center gap-8">
      <TrendArrow
        value={0}
        showValue
        title="No change"
        style={{ height: 24 }}
      />
      <TrendArrow
        value={Number.NaN}
        showValue
        title="Invalid"
        style={{ height: 24 }}
      />
    </div>
  );
}

More by ganapativs

View all
  • SparkBar

    SparkBar

  • Delta Indicator

    Delta Indicator

  • Dumbbell Chart

    Dumbbell Chart

  • Calendar Strip

    Calendar Strip

  • Rate Volume Chart

    Rate Volume Chart

  • Activity Grid

    Activity Grid

  • Heat Strip

    Heat Strip