amankaushik481

Chart Card

Cards

About

A card wrapper that frames a chart with a title, optional description and header action, used to give every chart on a dashboard a consistent header and labelled region.

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

Code

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

Usage.tsx

import { ChartCard } from "@/components/ui/chart-card";

export default function ChartCardDemo() {
  return (
    <ChartCard
      className="w-full max-w-xl"
      title="Signups"
      description="Last 14 days"
    >
      <div className="flex h-40 items-end gap-1">
        {[40, 55, 48, 70, 62, 80, 75, 90, 88, 95, 92, 100, 110, 120].map(
          (h, i) => (
            <div
              key={i}
              className="flex-1 rounded-sm bg-accent/80"
              style={{ height: `${h / 1.4}%` }}
            />
          ),
        )}
      </div>
    </ChartCard>
  );
}

More by amankaushik481

View all
  • Chip Filter

    Chip Filter

    7
  • Icon Button

    Icon Button

    5
  • Background Boxes

    Background Boxes

    4
  • Emoji Picker

    Emoji Picker

    4
  • Morphing Text

    Morphing Text

    2
  • Typing Text

    Typing Text

    1
  • Treemap Chart

    Treemap Chart

    1
  • Particles

    Particles

    1

More in Cards

View all
  • Course Design Cards

    Course Design Cards

    1.3K
  • Photo Deck

    Photo Deck

    47
  • Folded Card

    Folded Card

    45
  • Statistics Card 10

    Statistics Card 10

    304
  • Statistics Card 2

    Statistics Card 2

    309
  • Statistics Card 7

    Statistics Card 7

    336
  • CTA Section

    CTA Section

    6
  • Liquid Glass Card

    Liquid Glass Card

    198