
Widgets · €7
World clock
A clock per city. Drag one minute hand and every clock turns with it, to find a time that works for everyone.
Pay once on Gumroad: the download, plus a licence key for the registry and the MCP server.
Details
- Category
- Widgets
- Plan
- Paid, €7 once
- Code
- React + Tailwind, TypeScript · 309 lines
- Files
- WorldClock.tsx
- Needs
- React and Tailwind only
- Agents
- MCP server and shadcn registry
About
A clock for each city. Drag the minute hand of any clock and all of them turn together, so you can find a time that works for everyone. Let go and it glides to the nearest quarter hour. "Now" springs back to the live time, and the second hand sweeps again.
When every city is inside working hours, a small sign says "Everyone's at work".
Real time zones and summer time, read from the browser (Intl), for any city. White, black, or day and night: each panel white while it's day in that city and black at night. React + Tailwind, no other libraries. Respects reduced motion.
Install
Once: add the StackD registry to components.json, with the licence key from your receipt in STACKD_LICENSE_KEY (in .env.local):
"registries": {
"@stackd": {
"url": "https://www.stackd.codes/r/{name}.json",
"headers": { "X-License-Key": "${STACKD_LICENSE_KEY}" }
}
}With the shadcn CLI:
npx shadcn@latest add @stackd/world-clockOr let your agent add it through the StackD MCP server:
claude mcp add --transport http stackd https://www.stackd.codes/mcpPrompt for your agent
Paste it into Claude Code, Cursor, Codex or VS Code once the MCP server is connected.
Add the StackD World clock component to this project. Use the StackD MCP server: call get_component with { "name": "world-clock" }, write the files at the paths it gives and install any npm packages it lists. Then use it where it fits, following its README for the props, and keep its own styles. It is a paid component: if the server says it needs a licence, tell me where to buy it.Use
- Copy
WorldClock.tsxinto your project (for examplecomponents/). - Use it:
import { WorldClock } from './components/WorldClock'
<WorldClock
cities={[
{ code: 'AMS', timeZone: 'Europe/Amsterdam', name: 'Amsterdam' },
{ code: 'NYC', timeZone: 'America/New_York', name: 'New York' },
]}
onChange={(minutes) => console.log(`${minutes} min from now`)}
/>
timeZone is an IANA name, like Europe/Madrid, Asia/Tokyo or America/Los_Angeles. code is the big label; name is read by screen readers.
In Next.js the file already starts with 'use client'. In other React setups that line does nothing.
Options
| Prop | Default | What it does |
|---|---|---|
cities | Amsterdam and New York | { code, timeZone, name? }[], any number |
theme | 'light' | 'light' (white), 'dark' (black) or 'auto' (day and night per city) |
hours | [9, 18] | Working hours for the "Everyone's at work" sign |
onChange | Called when the planned time changes, with the minutes from now (0 = live) | |
width | 340 | px, or any CSS length |
color | Ochre | The second hand |
Keyboard
Tab to a clock. ← → move the planned time 15 minutes, Esc goes back to now. Each clock is a slider for screen readers and reads its time.
Colours from StackD
White #FFFFFF · Ink #141310 · Wine #901919 · Olive #6C8544 · Ochre #BE9344 · Lilac #C9B8FF
Licence
You can use it in personal and commercial projects. Don't resell or share the component on its own.
Made by StackD · stackd.codes



