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
  • Animated Beam

    Animated Beam

    53
  • Glow Border

    Glow Border

    16
  • Agent Roster

    Agent Roster

    13
  • Segmented Control

    Segmented Control

    12
  • FAQ Accordion Section

    FAQ Accordion Section

    3
  • API Key Field

    API Key Field

    3
  • Signature Pad

    Signature Pad

    1
  • Table Of Contents

    Table Of Contents

    1