Add this component

npx zentauri-ui add world-clock

Accessibility notes

Keyboard accessible by default with semantic markup, visible focus treatment, and tokenized states. Add descriptive labels for icon-only or decorative usage.

Dependency notes

Check Installation for shared peers. This component keeps styling in Tailwind classes and the --zui-* token contract.

Intl & Time

World Clock

Display multiple timezones as live clock cards with automatic ticking, day/night indicators, and local offset labels.

New York
4h
Fri, Jul 17
London
+1h
Fri, Jul 17
Tokyo
+9h
Fri, Jul 17

World clock variants playground

Pick a card appearance, size, and layout to preview the world clock live. Toggle Show output / Show code and the snippet updates to match the selected variant.


New York
4h
Fri, Jul 17
London
+1h
Fri, Jul 17
Tokyo
+9h
Fri, Jul 17

World Clock API

Generated from the package prop types and variant definitions.

WorldClock

WorldClockProps

Variants

PropTypeDefault
layout
gridlistrow
grid

Behavior

PropTypeDefault
cardAppearance'default' | 'outline' | 'blue' | 'green' | 'red' | 'gradient-blue' | 'gradient-purple' | 'glass' | 'surface' | null | undefinednone
cardSize'md' | 'sm' | 'lg' | null | undefinednone
hourCycle'h12' | 'h23' | undefinednone
localestring | undefinednone
showDateboolean | undefinednone
showDayNightboolean | undefinednone
showOffsetFromLocalboolean | undefinednone
showSecondsboolean | undefinednone
zones*(string | WorldClockZone)[]none
Inherited HTML props
PropTypeDefault
childrenReactNodenone
classNamestring | undefinednone
idstring | undefinednone
onClickMouseEventHandler<HTMLDivElement> | undefinednone
styleCSSProperties | undefinednone
titlestring | undefinednone

WorldClockCardVariant

WorldClockCardVariantProps

Behavior

PropTypeDefault
appearance'default' | 'outline' | 'blue' | 'green' | 'red' | 'gradient-blue' | 'gradient-purple' | 'glass' | 'surface' | null | undefinednone
size'md' | 'sm' | 'lg' | null | undefinednone

WorldClockVariant

WorldClockVariantProps

Behavior

PropTypeDefault
layout'grid' | 'row' | 'list' | null | undefinednone

WorldClockAnimated

WorldClockAnimatedProps

animated

Behavior

PropTypeDefault
animationWorldClockAnimation | undefinednone
cardAppearance'default' | 'outline' | 'blue' | 'green' | 'red' | 'gradient-blue' | 'gradient-purple' | 'glass' | 'surface' | null | undefinednone
cardSize'md' | 'sm' | 'lg' | null | undefinednone
hourCycle'h12' | 'h23' | undefinednone
layout'grid' | 'row' | 'list' | null | undefinednone
localestring | undefinednone
showDateboolean | undefinednone
showDayNightboolean | undefinednone
showOffsetFromLocalboolean | undefinednone
showSecondsboolean | undefinednone
zones*(string | WorldClockZone)[]none
Inherited HTML props
PropTypeDefault
childrenReactNodenone
classNamestring | undefinednone
idstring | undefinednone
onClickMouseEventHandler<HTMLDivElement> | undefinednone
styleCSSProperties | undefinednone
titlestring | undefinednone

What it does

WorldClock renders a responsive grid of clock cards, one per timezone. Each card displays the current time with ticking seconds, a day/night indicator (sun/moon icon), the timezone abbreviation, and the UTC offset.

API

Accepts a zones array of IANA timezone strings, and optional props for 12/24 hour format, showSeconds, custom card renderers, and grid layout configuration.

Common use cases

  • Remote team dashboards showing every member's local time
  • Travel planning pages with destination time previews
  • Global event schedules with real-time countdowns

Accessibility

Each clock card is a live region (aria-live='polite') so screen readers announce time updates. The time, offset, and day/night status are exposed as accessible text labels.

Next.js integration notes

Import the client component via a dynamic wrapper. The grid layout works perfectly with responsive Tailwind breakpoints and can be nested inside Server Component pages.

FAQ

How many clocks can I display at once?

There is no hard limit. The component uses a single shared timer for efficient re-renders across all clock cards. Performance is smooth even with 20+ zones.

Do clocks sync with the user's system time?

Yes. Each card computes its displayed time from the browser's local time offset against the target IANA zone, so clocks stay in sync with the system clock automatically.