Skip to content

    Browse components

    Clock

    An elegant analog clock with a smooth sweeping (or bouncy ticking) second hand, minute ticks, a digital readout and any IANA time zone.

    Open
    Customize
    Europe/London
    America/New_York
    Asia/Tokyo
    Australia/Sydney
    Asia/Manila

    Installation

    npx shadcn@latest add @glint-ui/clock

    First time using @glint-ui? Add the registry to components.json once, or install by URL: npx shadcn@latest add https://glintui.vercel.app/r/clock.json

    Usage

    import { Clock } from "@/components/ui/clock";
    
    <Clock timeZone="Asia/Tokyo" />
    <Clock size={160} sweep={false} showDigital={false} />

    Props

    PropTypeDefaultDescription
    timeZone"" | "Europe/London" | "America/New_York" | "Asia/Tokyo" | "Australia/Sydney" | "Asia/Manila"""IANA time zone. Empty = viewer's local time.
    labelstring—Caption on the face. Defaults to the zone's city.
    sizenumber280Diameter in px.
    sweepbooleantrueSmooth sweep; off ticks with a small bounce.
    showSecondsbooleantrueShow the second hand.
    showDigitalbooleantrueDigital readout on the face.
    hour12booleanfalse12-hour readout with AM/PM.
    showNumbersbooleantrueDraw 12 / 3 / 6 / 9.
    accentstring"#ff5a36"Second hand color.
    classNamestring—Extra classes for the root element.