Skip to content

Globe Clock

A 24-hour clock of three rotating dials around a spinning dotted globe; rings ripple out and sweep to the time on load.

3 variantsProNew

Preview

Preview

Installation

Globe Clock is part of Floret Pro. It follows Floret's theme tokens, so light and dark mode work out of the box.

Floret ProPro

Your license unlocks this component and all of its source. Sign in once, then install it with the CLI. Follow the steps below.

  1. Sign in with your license

    Paste the key from your purchase email. Once per computer.

    pnpm dlx @shipped-ui/floret login <license-key>
  2. Add Globe Clock

    The CLI checks your license, then copies the source with every dependency and theme token.

    pnpm dlx @shipped-ui/floret add globe-clock

Usage

Pass your own data and wire the callbacks to your app.

import { GlobeClock } from "@/components/ui/globe-clock/globe-clock";

<div className="aspect-square w-full max-w-md">
  <GlobeClock
    markers={[
      { id: "lisbon", label: "Lisbon", location: [38.72, -9.14] },
      { id: "seoul", label: "Seoul", location: [37.57, 126.98] },
    ]}
  />
</div>

Props

PropTypeDefaultDescription
markAnglenumber0Position of the reading mark in degrees clockwise from 12 o'clock.
thresholdnumber0.5Degrees either side of the mark that still light up.
globebooleantrueRender the cobe globe in the center.
markersGlobeMarker[]six world citiesCities on the globe. Labels follow them with CSS anchor positioning.
classNamestring—Size the clock here; it fills its box and stays square.
export type GlobeMarker = {
  id: string;            // becomes the CSS anchor --cobe-{id}
  label: string;
  location: [lat: number, lng: number];
};

Credits

This component is built on top of Cobe.