Deadline

Deadline is a copy-paste React component that stops missed a deadline by a time zone before the user submits. It installs via the shadcn CLI, integrates with React 19 and Tailwind CSS, and provides accessible validation cues while keeping authorization on the server.

pnpm dlx shadcn@latest add @bollard/deadline
Version 0.1.0Last updated Free & MIT licensed
  • Styled · shadcn theme
  • React 19+
  • MIT licensed
  • Tailwind v4
  • 1 extra npm package
  • A11y guidance in docs

StopsMissed a deadline by a time zone

Was this component page useful?

How do I install Deadline?

pnpm dlx shadcn@latest add @bollard/deadline

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

How do I use Deadline in React?

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 input mistakes does Deadline catch?

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

What props does Deadline accept?

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.

How is Deadline accessible?

  • 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.

What are the limitations and server boundaries?

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

What expensive mistakes does Deadline stop?

Missed a deadline by a time zone

Also known as

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

Field type

What dependencies does Deadline require?

Deadline facts & technical specifications

Technical specifications, licensing, and limitations
PropertySpecification
Component nameDeadline
Registry identifier@bollard/deadline
Install commandnpx shadcn@latest add @bollard/deadline
LicenseMIT License (free, commercial-friendly)
Price$0 (100% Free and Open Source)
Version0.1.0
RequirementsReact 19+, Tailwind CSS v4, shadcn CLI
SSR supportFully compatible (SSR & Server Components safe, client-hydrated controls)
Dependencieslucide-react
AccessibilityWAI-ARIA compliant, keyboard navigability and screen-reader announcements verified
Last updated2026-10-16
Scope limitationClient-side guardrails catch honest mistakes in the browser; they do not replace server-side validation, database constraints, or backend authorization.

Frequently asked questions about Deadline

How does Deadline handle date and time accuracy?

Deadline catches missed a deadline by a time zone. Validates calendar constraints: Deadlines in another time zone, shown in both zones, Midnight deadlines misread as the following day, Deadlines that are close (urgentWithin) or already overdue. Limitation: match deadline with server timezone.

How do I install deadline with shadcn?

Run `npx shadcn@latest add @bollard/deadline`. Sources added: registry/default/deadline/deadline.tsx. Package requirements: lucide-react.

What props customize Deadline?

Deadline accepts `due`, `ownerTimeZone`, `ownerPlace`, `viewerTimeZone`, `now`. Configures deadline, due date, countdown behavior. Limitation: invalid prop values fallback to safe default options.

What are the limits of deadline?

Time left uses the visitor's clock unless you pass `now`. The deadline's zone is whatever you pass in ownerTimeZone Server requirement: backend verification for deadline.

How does Deadline meet accessibility guidelines?

An overdue deadline is announced with role="alert". Urgency is stated in words as well as colour. Decorative separators are aria-hidden. Minimizes errors: deadline wrong time zone, midnight deadline confusion.

Which components pair with Deadline?