This component no longer exists. It was in shadcn/ui’s manifest when we first indexed it and is not there now — the registry served its inventory on 2026-08-13 and this item was not on it. The install command below will fail. It is kept here because a tutorial somewhere still tells people to run it.
time-picker
zenithui-chandubobbili/time-pickerRemovedComponent
shadcn/ui publishes no description for this item.
Install it
npx shadcn@latest add https://zenithui.chandubobbili.dev/r/time-picker.jsonSource
1"use client"23import { Button } from "@/components/ui/button"4import {5 Popover,6 PopoverContent,7 PopoverTrigger,8} from "@/components/ui/popover"9import { ScrollArea } from "@/components/ui/scroll-area"10import { ToggleGroup, ToggleGroupItem } from "@/components/ui/toggle-group"11import { cn } from "@/lib/utils"12import { useTimePicker } from "@zenithui/time-picker"13import { useEffect, useRef } from "react"14import { Clock } from "lucide-react"1516function formatTimeto24(time: string) {17 const [hours, minutes] = time.split(":").map(Number)18 const period = hours >= 12 ? "PM" : "AM"19 // Convert 0 -> 12 for AM and 12 -> 12 for PM20 const formattedHours = hours % 12 || 1221 // Ensure two-digit minutes22 const formattedMinutes = String(minutes).padStart(2, "0")23 return `${formattedHours}:${formattedMinutes} ${period}`24}2526interface TimePickerProps {27 time: string // HH:MM28 onTimeChange: (time: string) => void // HH:MM29 className?: string30 format?: "12-hours" | "24-hours"31 align?: "center" | "end" | "start"32 side?: "top" | "right" | "bottom" | "left"33 alignOffset?: number34 sideOffset?: number35 formatter?: (time: string) => string36}3738export default function TimePicker({39 time,40 onTimeChange,41 className,42 format = "12-hours",43 align = "center",44 side = "bottom",45 alignOffset = 0,46 sideOffset = 0,47 formatter = formatTimeto24,48}: TimePickerProps) {49 const {50 hours,51 minutes,52 periods,53 hour,54 minute,55 period,56 setHour,57 setMinute,58 setPeriod,59 } = useTimePicker({60 format: format,61 initialTime: time,62 onTimeChange: onTimeChange,63 })6465 return (66 <Popover>67 <PopoverTrigger asChild>68 <Button69 variant="outline"70 className={cn(71 "flex w-full max-w-32 items-center justify-between",72 className,73 )}74 >75 <span className="text-sky-950">{`${formatter(time)}`}</span>76 <Clock className="size-5 cursor-pointer self-center text-slate-500" />77 </Button>78 </PopoverTrigger>79 <PopoverContent80 align={align}81 side={side}82 alignOffset={alignOffset}83 sideOffset={sideOffset}84 className={cn(85 "grid h-fit gap-1 overflow-hidden rounded-sm px-0 py-4",86 format === "12-hours" ? "w-60 grid-cols-3" : "w-40 grid-cols-2",87 )}88 onWheel={(e) => {89 e.stopPropagation()90 }}91 >92 <TimeScrollList93 options={hours}94 value={hour}95// … truncated
What it pulls in
npm packages
Other registry items
