Skip to content
mdxcn is now part of Shadcn Labs. details

countdown

GraphCountdown

Time remaining until a date. Once the date passes, it shows a short label you choose. Write `2026-12-01 — until launch` inside the tag.

use it
Good for a freeze, a launch, or a window that closes.
instead
Elapsed time since a start is Timer.

written

The date, then the caption after an em dash.

[ LAUNCH ]

00:00:00

until 2.0

remaining 00:00:00
<GraphCountdown title="LAUNCH">2027-01-15T09:00:00Z — until 2.0</GraphCountdown>

install

command

freeze

Until New Year's. After that it says open.

[ FREEZE ]

00:00:00

until launch

remaining 00:00:00
import { GraphCountdown } from "@/registry/default/graph-countdown/graph-countdown"

<GraphCountdown
  title="FREEZE"
  to="2027-01-01T00:00:00Z"
  done="open"
  caption="until launch"
/>

closed

The date has passed, so the frame shows the label you set.

[ WINDOW ]

00:00:00

remaining 00:00:00
import { GraphCountdown } from "@/registry/default/graph-countdown/graph-countdown"

<GraphCountdown
  title="WINDOW"
  to="2020-01-01T00:00:00Z"
  done="closed"
/>
[ PROPS ]
PropTypeDefaultDescription
titlestring—Caption drawn on the top edge of the frame.
toDate | number | string—The deadline. A date, timestamp, or ISO string. Optional when children are Markdown.
childrenMarkdown—2026-12-01 — until launch
donestring"done"What to show after the deadline.
captionstring—Line under the number.
palette"mono" | "duo" | "multi""mono"mono is one accent plus muted. duo paints the second series with --graph-accent-2. multi cycles three accents.
cornerstring"+"Character at each corner of the frame.
frame"box" | "corners" | "rule" | "none""box"box draws the dashed border. corners keeps only the corner marks. rule draws dashed lines above and below. none drops the border and padding, and puts the title above the content.
classNamestring—Passed to the outer frame.