appica-dev

Sparkline

Component 2

About

A compact inline chart (line, area, or column) that shows a data trend at a glance inside a KPI card, table row, or dashboard header, with an optional hover tooltip and live-updating value/label.

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

Code

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

Usage.tsx

import { Sparkline, SparklineChart } from "@/components/ui/sparkline";

export default function SparklineDefault() {
  return (
    <Sparkline
      data={[8, 14, 10, 18, 15, 22, 19, 27, 24, 31]}
      className="w-64 max-w-full"
    >
      <SparklineChart aria-label="Trend over the last 10 periods" />
    </Sparkline>
  );
}

More by appica-dev

View all
  • Border Beam

    Border Beam

    43
  • Text Animate

    Text Animate

    19
  • Carousel

    Carousel

    14
  • Table of Contents

    Table of Contents

    6
  • Color Area

    Color Area

    6
  • Avatar

    Avatar

    6
  • Background Pattern

    Background Pattern

    3
  • Autocomplete

    Autocomplete

    2