ZeroGravity UI

Interfacestable

Clock

Date and time display

A compact live or static date and time, formatted with Intl in any locale and time zone.

Customize

DisplayIntl formatting, no date library
variant
show
seconds
timeZone

Usage

TSX
import { Clock } from "zerogravity/clock"

<Clock />

Generated from the controls above. Only props that differ from their defaults are shown.

Props

9 documented props on Clock
PropertyTypeDefaultDescription
variant"pixel" | "classic" | "glass""pixel"Style.
show"datetime" | "date" | "time""datetime"Show.
secondsbooleanfalseSeconds.
valueDateliveA fixed instant instead of the live time.
timeZonestringdeviceAny IANA zone.
localestringdeviceAny BCP 47 locale.
hour12booleanlocaleForce a 12 or 24 hour clock.
dateFormatIntl.DateTimeFormatOptions{ weekday: short, day: numeric, month: short }Date part options.
separatorReactNode"·"Between date and time.

Dependencies

0 external runtime dependencies

Ships with nothing but React.