BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/atroui/local-clock

Local Clock

atroui/local-clock
FreeBlock

Timezone-aware local time chip.

Install it

npx shadcn@latest add https://atroui.com/r/local-clock.json

Source

registry/default/blocks/local-clock.tsxatroui.com/r/local-clock.json
1"use client"
2
3import * as React from "react"
4
5import { cn } from "@/lib/utils"
6
7/** Defaults — edit timezone props after install. */
8const CONTENT = {
9 timezone: "America/New_York",
10 timezoneLabel: "ET",
11}
12
13export function LocalClock({
14 timezone = CONTENT.timezone,
15 timezoneLabel = CONTENT.timezoneLabel,
16 className,
17}: {
18 timezone?: string
19 timezoneLabel?: string
20 className?: string
21} = {}) {
22 const [now, setNow] = React.useState<Date | null>(null)
23
24 React.useEffect(() => {
25 const tick = () => setNow(new Date())
26 tick()
27 const timer = window.setInterval(tick, 30_000)
28 return () => window.clearInterval(timer)
29 }, [])
30
31 const time = now
32 ? new Intl.DateTimeFormat("en-US", {
33 timeZone: timezone,
34 hour: "numeric",
35 minute: "2-digit",
36 hour12: true,
37 }).format(now)
38 : "—:—"
39
40 return (
41 <span
42 className={cn(
43 "inline-flex items-center gap-1 font-mono text-[11.5px] text-muted-foreground tabular-nums",
44 className
45 )}
46 aria-label={`Local time in ${timezoneLabel}: ${time}`}
47 title={`${timezoneLabel} · ${timezone}`}
48 >
49 <span className="text-foreground">{time}</span>
50 <span className="text-muted-foreground/70">{timezoneLabel}</span>
51 </span>
52 )
53}

What it pulls in

Other registry items

  • @atroui/utils

Files it writes

  • registry/default/blocks/local-clock.tsx

Facts

Registry
atroui
Type
registry:block
Access
Free
Files written
1
Licence
MIT
First indexed
2026-08-11
Last confirmed
today

Go to the source

atroui.com atroui/atroui on GitHub Raw registry item This item as JSON

More from atroui

All 81 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
Analytics Provideranalytics-provideratrouiBlocksFree1 dep
AR Portfolioar-portfolioatrouiBlocksFree1 dep
Before / Afterbefore-after-slideratrouiBlocksFreeno deps
Calendly Embedcalendly-embedatrouiBlocksFree1 dep
ChangelogchangelogatrouiBlocksFreeno deps
Command Menucommand-menuatrouiBlocksFree4 deps
Contact Formcontact-formatrouiBlocksFree2 deps
Contextual CTAcontextual-ctaatrouiBlocksFree2 deps
BlockDex

Built by

Kynth Studios

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studios

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studios

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex