Emirhan Albayrak

Tear-Off Calendar

Component 10

About

A paper calendar pad you can actually tear. Grab the sheet anywhere and pull: the month rips off along the perforation and falls. Click a day for a frosted-glass zoom, pin a sticky note and write on it by hand. Light and dark, any locale.

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

Code

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

Usage.tsx

import * as React from "react";
import { TearOffCalendar, type CalendarNotes } from "@/components/ui/tear-off-calendar";

// A few notes in the current month so the pad does not start empty.
function sampleNotes(): CalendarNotes {
  const now = new Date();
  const key = (day: number) => `${now.getFullYear()}-${String(now.getMonth() + 1).padStart(2, "0")}-${String(day).padStart(2, "0")}`;
  const today = now.getDate();
  const free = [4, 9, 13, 19, 23, 26].filter((day) => day !== today);
  return {
    [key(free[0])]: { text: "Gym 7am!", color: "mint" },
    [key(free[2])]: { text: "Call mom", color: "yellow" },
    [key(free[4])]: { text: "Flight 09:40", color: "sky" },
  };
}

export default function DemoDefault() {
  const [notes] = React.useState(sampleNotes);
  return (
    <div className="flex min-h-[680px] w-full flex-col items-center justify-center gap-5 overflow-hidden bg-background px-3 py-10">
      <TearOffCalendar defaultNotes={notes} />
      <p className="max-w-[560px] text-center text-[13px] leading-relaxed text-muted-foreground">
        Grab the sheet anywhere and pull: the month rips off along the perforation. Click a day to zoom in, pin a sticky note and write on it.
      </p>
    </div>
  );
}

Dependencies

More by Emirhan Albayrak

View all
  • Animated Bento Features

    Animated Bento Features

    31
  • Vitals Widget

    Vitals Widget

    30
  • Coin Rack Selector

    Coin Rack Selector

    18
  • Glow Widgets

    Glow Widgets

    12
  • Hand Pull Refresh

    Hand Pull Refresh

    7
  • Storage Folder Card

    Storage Folder Card

    6
  • Coin Plan Picker

    Coin Plan Picker

    1
  • Fold Logo

    Fold Logo