Loading...
Please waitLoading...
Please waitpnpm dlx shadcn@latest add https://usekit.kiron.dev/k/use-clock
"use client"
import { useClock } from "@/hooks/use-clock"
export function Component() {
const time = useClock({
locale: "en-US",
formatOptions: {
hour: "2-digit",
minute: "2-digit",
second: "2-digit",
hour12: true,
},
})
return (
<div>
<p>Current time: {time}</p>
</div>
)
}
Name | Type | Description |
---|---|---|
time | string | The current time formatted as HH:mm:ss . |
20:18:03
Current Time