vamsiy78

Countdown

Component

About

An accessible countdown timer that displays hours, minutes and seconds, supports controlled or local state, pausing, and announces when it completes.

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

Code

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

Usage.tsx

import { Countdown } from "@/components/ui/countdown";
export default function CountdownDemo() {
  return (
    <div className="bg-card flex w-full max-w-xs flex-col items-center gap-3 rounded-xl border border-border p-5">
      <p className="text-sm font-medium">Your session closes in</p>
      <Countdown defaultValue={600} label="Session remaining" />
      <p className="text-muted-foreground text-xs">
        Save your work before the timer ends.
      </p>
    </div>
  );
}

More by vamsiy78

View all
  • Segmented Control

    Segmented Control

    8
  • Animated Beam

    Animated Beam

    7
  • Agent Roster

    Agent Roster

    5
  • Table Of Contents

    Table Of Contents

    1
  • API Key Field

    API Key Field

    1
  • Toast Stack

    Toast Stack

  • Team Portrait Grid

    Team Portrait Grid

  • Image Cropper

    Image Cropper