Deadline

Shows time left and the exact moment in both your time zone and the owner's, so a deadline isn't missed to a time-zone slip or a misread midnight.

StopsMissed a deadline by a time zone

Installation

pnpm dlx shadcn@latest add https://bollard-ui.vercel.app/r/deadline.json

The files land in your project. They're yours to edit.

Usage

deadline-usage.tsx
import { Deadline } from "@/components/ui/deadline"

<Deadline label="Tax filing" due={Date.UTC(2026, 9, 14, 4, 0)} ownerTimeZone="America/New_York" viewerTimeZone="Asia/Kolkata" now={NOW} />

What it catches

  • Deadlines in another time zone, shown in both zones
  • Midnight deadlines misread as the following day
  • Deadlines that are close (urgentWithin) or already overdue

Props

Deadline props
PropTypeDefault
due* (required)

The deadline instant, or a bare "YYYY-MM-DD" meaning the end of that day for the owner.

Date | number | string—
ownerTimeZone* (required)

IANA zone the deadline was set in, e.g. "Europe/London". "Etc/GMT+12" is Anywhere on Earth.

string—
ownerPlace

Name for the owner's zone. Defaults to its city, or "AoE".

stringownerTimeZone === "Etc/GMT+12" ? "AoE" : ownerTimeZone.sp…
viewerTimeZone

Viewer's zone. Defaults to the browser's.

string—
now

Fixed "now" for previews and tests. Defaults to a live clock.

Date | number—
urgentWithin

Turns amber when less than this many ms are left.

number24 * 3_600_000
label

What is due, e.g. "Proposal".

string—
locale

Number, date and clock formatting locale. English locales use a 12-hour clock, others their own.

string"en-GB"
hour12

Force a 12- or 24-hour clock regardless of `locale`.

boolean—
dueText

Templates: `{relative}`, `{day}` and `{place}` are filled in.

string"Due {relative}"
overdueText

Text shown when the deadline has passed.

string"Overdue · {relative}"
midnightText

Explains that midnight means the end of the previous day.

string"Midnight in {place} means the end of {day}, not the start."
endOfDayLabel

Label used for end-of-day times.

string"End of day"
ownerTimeText

The owner's time, after yours. `{time}` and `{place}` are filled in; `{day}` too when the date differs.

string"{time} in {place}"
ownerDayTimeText

Same as `ownerTimeText` when the owner's date differs from yours.

string"{day}, {time} in {place}"
midnightLabel

Word used for 00:00.

string"midnight"

* required. Also accepts the native props of <div> (className, aria-*, data-*…), passed through to it.

Accessibility

  • An overdue deadline is announced with role="alert"
  • Urgency is stated in words as well as colour
  • Decorative separators are aria-hidden

Only what the source does. Test with your own screen reader and content before shipping.

Limitations

  • Time left uses the visitor's clock unless you pass `now`
  • The deadline's zone is whatever you pass in ownerTimeZone

What it stops

Missed a deadline by a time zone

Also known as

deadline · due date · countdown · time zone · submission · hackathon · midnight · ist

Field type

Dependencies

Pairs well with