Command Palette

Search for a command to run...

Timezone

shadcn/ui

Display the current timezone and relative time from a given timestamp.

Timezone

import { Timezone } from "@/components/optics/timezone";import { Button } from "@/components/optics/button";<Timezone  render={<Button variant="raised">Open Timezone</Button>}  timestamp={1768579697213}/>

Installation

pnpm dlx shadcn@latest add @optics/timezone

Props

<Timezone />
Name
Type
timestamp
string(default: Date.now())
render
ReactNode(default: null)
side
string(default: top)
sideOffset
number(default: 4)