Skip to content

Local Time

Free

One moment in two zones: your time first, then the time of the event or the person, with a day word when the day is not the same.

  • React Aria
  • React 19
  • Tailwind CSS 4

Added Nov 9, 2026 · MIT + Commons Clause

Playground

Loading the preview

Props

Pass the moment and the zone of the person. Put a LocalTimeEmpty inside for a call that is not booked yet.

next-calls.tsx

LocalTime

<span>
PropTypeDefaultDescription
layout"inline""stacked""inline"
dateRequiredDateLike | null—The moment (an invite, a booking, office hours): a Date, an ISO string, epoch milliseconds, or a DateValue; a value with no zone ("2026-11-12T09:00") is a wall time in timeZone. The text "now": their time now, kept true (a team card). null shows "—".
endDateLike | null—The end of a range ("9:00 – 10:00 AM"). Not with date="now".
timeZoneRequiredstring—Their IANA zone: the zone of the event or the person ("America/New_York").
localTimeZonestring—The reader's IANA zone. Default: the runtime zone, known only after hydration. Pass it when the server knows it (a profile setting): then the full text renders on the server.
hourCycle1224—12 ("3:00 PM") or 24 ("15:00"). Default: the locale's cycle.
localestring—The BCP 47 tag. Default: the DisplayLocaleProvider locale, else "en-US".
nownumber | Date—A fixed now for date="now" (tests, stories): no clock runs.
labelsPartial<LocalTimeLabels>—The words, to translate them (LOCAL_TIME_LABELS of #/lib/time-zone-format).
childrenReactNode—A LocalTimeEmpty part: the words of no value. With a value, they are not drawn.
...props<span> attributes—Every other attribute goes to the <span>, with a ref.

LocalTimeEmpty

<div>
PropTypeDefaultDescription
data-slotstring—The data-slot of the root: the item's own slot ("time-ago"). Default "empty-value".
From Base UIUseRenderBase UI docs
render—Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render.
...props<div> attributes—Every other attribute goes to the <div>, with a ref.
  • Use it for an invite or an event that happens in another zone.
  • Use date="now" for the time now of a person, with how far ahead or behind they are.
  • Use layout="stacked" in a card, and inline in a line of text.
Your time
fade · the text that comes after hydration fades in once

Built with

Installs with Local Time

  1. AddedLocal Time, with Clock, Date Display.
Open the release