Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Time Zone Setup Onboarding Block for Radix UI

A time zone read from the browser after mount, a Change select of ten zones with their offsets, and two drawn analog clocks for you and the team's headquarters at one fixed instant.

Framework
UI library

Preview

Preview width

Installation

Part of Pro
Pro unlocks the code and one-line install of every Pro button and text effect, plus the MCP for your AI editor.
Have Pro already? Sign in to open it.Opens here as soon as you're Pro.

Overview

Check the time zone before it spoils every meeting with this time zone step for React with Radix UI. It is a step of Zonemoor, a remote-team scheduler, as a whole screen: the page's rails and one band, a step header and a framed panel. “We think you're in Europe/Berlin” is read from the browser after the page loads, with a Change button that opens a select of ten zones and their offsets in a row that is always reserved. Below it two drawn analog clocks, yours and the team's headquarters in New York, show the same fixed instant (14 October 2026, 09:00 UTC) with hands and a “11:00, Wed” label computed with Intl, and one line says how far apart they are. Confirm is the one Shine Button, with a ghost Skip for now. Nothing is saved.

FAQ

Where does the zone come from?

From Intl.DateTimeFormat().resolvedOptions().timeZone, read in an effect after the page loads. Until then (and on the server) the block shows a typed FALLBACK zone, so the first paint is the same everywhere. If the browser's zone is not one of the ten in ZONES, it is added to the top of the select.

How are the clocks drawn?

Each one is an SVG with twelve tick lines and two hands. The hour and minute come from Intl.DateTimeFormat with a timeZone for the fixed instant, the hands' ends are worked out with sine and cosine at module scope, and the time written under each clock is the same reading, so the picture is never the only source. The clocks are hidden from assistive technology and always drawn left to right.

Why a fixed instant instead of the current time?

So the page reads the same for everyone and a screenshot is stable. The instant is the INSTANT constant; set it to the current time in your app, and update it on a timer if you want the hands to move.

How does Change work?

It toggles a select that is always in the layout: closed it is invisible and inert and keeps its space, so the panel never changes height. Pressing Change moves focus to the select, and picking a zone redraws the first clock and the line about the gap at once.

What stays local in the demo, and how do I wire it?

Confirm only says the zone was confirmed in this demo; nothing is saved. In your app save the zone name (the IANA string such as Europe/Berlin, not an offset, which changes with daylight saving) to the account where submit says so.

How does it look on a phone?

The two clocks stay side by side and shrink a little, the gap line wraps and Confirm pins to the foot of the screen with Skip for now beside it.