components / clock

clock.

live clock — thin-stroke analog face, tabular-nums digital readout, or both. any iana time zone via intl, optional sweep second hand. ssr-safe: renders a stable midnight form until mounted.

00:00:00
sfo
00:00:00
lhr
00:00:00
icn
12:00:00 amGMT+9
installation
bunx @justin06lee/chrome@latest add clock
props
nametypedefaultdescription
variant'analog' | 'digital' | 'both''analog''both' stacks the face over the readout.
timeZonestring-iana zone, e.g. "Asia/Seoul". omit for the viewer's local zone.
showSecondsbooleantruesecond hand and :ss in the readout.
hour12booleanfalse12-hour readout with an am/pm suffix.
sizenumber160analog face edge in px; the digital readout is sized by className.
ticksbooleantruehour tick marks around the face.
sweepbooleanfalsesweep the second hand continuously instead of stepping. costs a raf loop; ignored under prefers-reduced-motion.
showZonebooleanfalsezone abbreviation under the readout, e.g. "KST".
accentstring-css color for the second hand. defaults to the muted white step.
classNamestring-