Skip to content

Countdown

The time left until a moment: a link that expires, a maintenance window. It updates each second and says when the time is up.

import { Countdown } from '@sypnia/ui/react'

On this page
  1. An invitation that expires
  2. When to use it
  3. For everyone
  4. Props

An invitation that expires

The invitation link expires in
Code
import { Countdown } from '@sypnia/ui/react';

// How long a link stays valid. A fixed moment, so the server and the browser agree on it.
export default function Expiry() {
  return <Countdown to="2026-12-31T23:59:00Z" label="The invitation link expires in" />;
}

When to use it

Use it when

  • Deadlines that matter to what the person is doing now.

Do not use it when

  • Dates far away: write the date.

For everyone

  • The exact moment is in the time element and its title.
  • It is not a live region, so it does not interrupt each second.

Props

CountdownTypeDefault
torequired string | number | Date
label ReactNode
onEnd (() => void)
  1. An invitation that expires
  2. When to use it
  3. For everyone
  4. Props

    Search pages, sections and terms