Kinetik UI

Dual Clock

.md

Two world clocks side by side, one light and one dark, their hands running on the UI thread.

v1.0.0Live on web@shopify/react-native-skiareact-native-reanimatedreact-native-worklets
Component preview

Installation

Kinetik CLI
npx kinetik-ui add dual-clock

The CLI copies the source and installs native dependencies with npx expo install, so versions match your Expo SDK. With shadcn: npx shadcn@latest add https://kinetik-ui.dev/r/dual-clock.json

Install manually

  1. Install dependencies
    npx expo install @shopify/react-native-skia react-native-reanimated react-native-worklets
  2. Copy the source files
    • components/kinetik/dual-clock.tsx
    View source files

Usage

import { DualClock } from '@/components/kinetik/dual-clock';

<DualClock
  zones={[
    { code: 'TYO', offset: 9, face: 'day' },
    { code: 'RIO', offset: -3, face: 'night' },
  ]}
/>;

When to use

  • Teams and travellers who watch two time zones.
  • A clock widget on a dashboard.

When not to use

  • More than two zones. Use a list.
  • Places with daylight saving, unless you update offset yourself.

Notes

  • offset is hours from UTC, so daylight saving is yours to handle.
  • Pass time to show a fixed moment. The clocks then hold still.
  • Each face follows the hour unless you set face.

Props

DualClockProps

PropTypeDefaultDescription
zonesrequired[DualClockZone, DualClockZone]—Two time zones, one per face.
timeDate—A fixed moment to show. Leave it out and the clocks run live.
homeOffsetnumber—Offset of the viewer's zone, used for the "+3" under each code. Defaults to the device's.
styleStyleProp<ViewStyle>—

Performance and accessibility

Performance

Budget
Hands are views on continuous UI-thread timings, so the clocks animate at rest with no re-render. One timer per minute keeps the spoken time current.
Measured

Huawei P20 Lite (ANE-LX1), Android 9, release build · 22 ms median frame, 24 ms p90 · keeps drawing at rest · 126 MB app memory

Accessibility

Reduced motion
The second hand is removed and the other hands move once a minute.
Screen readers
One label with both times ("TYO 21:04, RIO 09:04").
Touch target
Not interactive.

Source files

components/kinetik/dual-clock.tsx is in the Code tab of the preview above.