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={1796030717914}/>

Installation

pnpm dlx shadcn@latest add @optics/timezone

Props

<Timezone />
Name
Type
timestamp
string | number | Date(default: Date.now())
render
React.ReactElement(default: null)
side
string(default: top)
sideOffset
number(default: 4)
variant
"link" | "outline" | "default"
alignOffset
number