---
title: "Analog Clock"
description: "A live clock face for any time zone, drawn in one SVG. The hands step on a firm spring, and the clock stops while it is off screen."
url: https://gelatinui.com/components/analog-clock
markdown_url: https://gelatinui.com/components/analog-clock.md
access: pro
install: "npx shadcn@latest add @gelatin-ui-pro/analog-clock"
version: "2026-11-09"
index: https://gelatinui.com/llms.txt
docs_index: https://gelatinui.com/docs/llms.txt
---

# Analog Clock

> A live clock face for any time zone, drawn in one SVG. The hands step on a firm spring, and the clock stops while it is off screen.

Page: https://gelatinui.com/components/analog-clock

## When to use it

Best for: A live clock face in any time zone that takes its size from the text or a diameter.

- Use it when a face reads faster than digits, such as a world clock list.
- Use `showSeconds` for a second hand. Without it, the hands move once a minute.
- Use `marks` to show every hour, the quarters, or no marks.

## When not to use it

- For the time as text, use a [Clock](https://gelatinui.com/components/clock.md).
- For the time left until a moment, use a [Countdown](https://gelatinui.com/components/countdown.md).

## Notes for agents

- Set `timeZone` to an IANA id, such as `Asia/Tokyo`. With no zone, it uses the zone of the browser.
- The face uses `currentColor`. Set a text color on the parent to color the hands.
- The second hand reads `--analog-clock-second`, which defaults to `destructive`.
- Under 120px the face drops the hour marks, and under 48px it fills and adds a tail.
- The hands stop when the clock is off screen or the tab is hidden, and jump to the time on show.
- An invalid zone shows the face with no hands.

## Anatomy

```text
AnalogClock
```

## API reference

### AnalogClock

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `timeZone` | `string` |  | The IANA zone ("Asia/Tokyo"). Default: the reader's zone. |
| `showSeconds` | `boolean` | false | Draw the second hand, which steps once a second. Default `false`: the hands step each minute. |
| `marks` | `"hours" \| "none" \| "quarters"` | "hours" | The marks: `hours` (default), `quarters`, or `none`. A face of 48px or less draws none. |
| `diameter` | `number` |  | The size in px. Default: `1em`, so the face takes the font size around it. |
| `now` | `number \| Date` |  | A fixed now for tests and stories: the hands stand still. |

## Styling

| Part | Slot | States | CSS variables | Tokens |
| --- | --- | --- | --- | --- |
| AnalogClock | `analog-clock` |  | `--analog-clock-second`, `--destructive` |  |

## Usage

Import Analog Clock and compose its parts.

```tsx title="analog-clock.tsx"
import { AnalogClock } from "@/components/pro/effects/analog-clock";

export function AnalogClockDemo() {
  return <AnalogClock diameter={120} showSeconds timeZone="Asia/Tokyo" />;
}
```

## Compose

Rules:

- Compose the parts (`compose-parts`): Build each item from its named parts as children, and pass your text and icons in as parts.
- Every state is designed (`every-state`): Give each view of data its loading, empty, and error states: a skeleton in the final layout, an `Empty` with an illustration and one next action, and an error that says what failed and how to retry.

## Add it

```bash
npx shadcn@latest add @gelatin-ui-pro/analog-clock
```

It adds 23 registry items: 22 files, 3870 lines, and the npm packages `@base-ui/react`, `@internationalized/date`, `@mantine/hooks`, `motion`, `tailwind-merge`, `tailwind-variants`.

## For AI agents

- Every item, one file: https://gelatinui.com/llms.txt
- MCP server (`search_items`, `get_item`, `get_install_plan`): https://gelatinui.com/mcp

## Related

- [Clock](https://gelatinui.com/components/clock.md)
- [Local Time](https://gelatinui.com/components/local-time.md)
- [Countdown](https://gelatinui.com/components/countdown.md)

## Motion

| Part | Motion |
| --- | --- |
| Hand step | clockTick · a stiff spring turns each hand one step |
| First paint | fade · the hands fade in after hydration |
