shadcn.io is not affiliated with official shadcn/ui
Time Zone Setup Onboarding Block for Svelte
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.
Installation
Overview
Check the time zone before it spoils every meeting with this time zone step for Svelte with Ark 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.