ganapativs

Calendar Strip

Component

About

A compact SVG strip that renders recent weeks day-by-day on a real calendar grid, shading each day by its value and showing days with no data differently from days with a zero value — useful for habit trackers and deploy-cadence widgets.

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

Code

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

Usage.tsx

import { CalendarStrip } from "@/components/ui/calendar-strip";

const days = Array.from({ length: 18 }, (_, i) => ({
  date: `2026-06-${String(4 + i).padStart(2, "0")}`,
  value: i % 4 === 3 ? 0 : (i % 7) + 1,
}));

export default function CalendarStripTwoWeeksDemo() {
  return (
    <div className="flex items-center justify-center p-8">
      <CalendarStrip
        data={days}
        end="2026-07-01"
        weeks={2}
        title="Two weeks"
        style={{ width: 150, height: 42 }}
      />
    </div>
  );
}

More by ganapativs

View all
  • SparkBar

    SparkBar

  • Delta Indicator

    Delta Indicator

  • Dumbbell Chart

    Dumbbell Chart

  • Heat Strip

    Heat Strip