BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/diceui/radix/time-picker

time-picker

diceui-radix/time-picker
FreeComponent

diceui/radix publishes no description for this item.

Install it

npx shadcn@latest add https://raw.githubusercontent.com/sadmann7/diceui/HEAD/docs/public/r/styles/radix-nova/time-picker.json

Source

ui/time-picker.tsxraw.githubusercontent.com/sadmann7/diceui/HEAD/docs/public/r/styles/radix-nova/time-picker.json · first 6 KB
1"use client";
2
3import { Clock } from "lucide-react";
4import { Slot as SlotPrimitive } from "radix-ui";
5import * as React from "react";
6import { useComposedRefs } from "@/lib/compose-refs";
7import { cn } from "@/lib/utils";
8import { VisuallyHiddenInput } from "@/registry/bases/radix/components/visually-hidden-input";
9import { useAsRef } from "@/registry/bases/radix/hooks/use-as-ref";
10import { useIsomorphicLayoutEffect } from "@/registry/bases/radix/hooks/use-isomorphic-layout-effect";
11import { useLazyRef } from "@/registry/bases/radix/hooks/use-lazy-ref";
12import {
13 Popover,
14 PopoverAnchor,
15 PopoverContent,
16 PopoverTrigger,
17} from "@/registry/bases/radix/ui/popover";
18
19const ROOT_NAME = "TimePicker";
20const LABEL_NAME = "TimePickerLabel";
21const INPUT_GROUP_NAME = "TimePickerInputGroup";
22const INPUT_NAME = "TimePickerInput";
23const TRIGGER_NAME = "TimePickerTrigger";
24const CONTENT_NAME = "TimePickerContent";
25const COLUMN_NAME = "TimePickerColumn";
26const COLUMN_ITEM_NAME = "TimePickerColumnItem";
27const HOUR_NAME = "TimePickerHour";
28const MINUTE_NAME = "TimePickerMinute";
29const SECOND_NAME = "TimePickerSecond";
30const PERIOD_NAME = "TimePickerPeriod";
31const CLEAR_NAME = "TimePickerClear";
32
33const DEFAULT_STEP = 1;
34const DEFAULT_SEGMENT_PLACEHOLDER = "--";
35const DEFAULT_LOCALE = undefined;
36const SEGMENTS: Segment[] = ["hour", "minute", "second", "period"];
37const PERIODS = ["AM", "PM"] as const;
38
39type Segment = "hour" | "minute" | "second" | "period";
40type SegmentFormat = "numeric" | "2-digit";
41type Period = (typeof PERIODS)[number];
42
43interface DivProps extends React.ComponentProps<"div"> {
44 asChild?: boolean;
45}
46
47interface ButtonProps extends React.ComponentProps<"button"> {
48 asChild?: boolean;
49}
50
51type PopoverContentProps = React.ComponentProps<typeof PopoverContent>;
52
53type InputGroupElement = React.ComponentRef<typeof TimePickerInputGroup>;
54type InputElement = React.ComponentRef<typeof TimePickerInput>;
55type TriggerElement = React.ComponentRef<typeof TimePickerTrigger>;
56type ColumnElement = React.ComponentRef<typeof TimePickerColumn>;
57type ColumnItemElement = React.ComponentRef<typeof TimePickerColumnItem>;
58
59interface TimeValue {
60 hour?: number;
61 minute?: number;
62 second?: number;
63 period?: Period;
64}
65
66interface ItemData {
67 value: number | string;
68 ref: React.RefObject<ColumnItemElement | null>;
69 selected: boolean;
70}
71
72interface ColumnData {
73 id: string;
74 ref: React.RefObject<ColumnElement | null>;
75// … truncated

What it pulls in

npm packages

  • radix-ui

Other registry items

  • popover
  • @diceui/use-as-ref
  • @diceui/use-isomorphic-layout-effect
  • @diceui/use-lazy-ref

Files it writes

  • ui/time-picker.tsx
  • components/visually-hidden-input.tsx
  • lib/compose-refs.ts

Facts

Registry
diceui/radix
Type
registry:ui
Access
Free
Files written
3
Licence
the repository states none
In the index
at or before 2026-08-05
Last confirmed
3 days ago

Go to the source

www.diceui.com sadmann7/diceui on GitHub Raw registry item This item as JSON

More from diceui/radix

All 58 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
action-baraction-bardiceui/radixComponentsFree1 dep · 2 files
angle-sliderangle-sliderdiceui/radixComponentsFree1 dep · 3 files
avatar-groupavatar-groupdiceui/radixComponentsFree1 dep
badge-overflowbadge-overflowdiceui/radixComponentsFree1 dep · 2 files
bannerbannerdiceui/radixComponentsFree1 dep
checkbox-groupcheckbox-groupdiceui/radixComponentsFree1 dep
circular-progresscircular-progressdiceui/radixComponentsFree1 dep
client-onlyclient-onlydiceui/radixComponentsFreeno deps

Also from Kynth Studios

Built for the same person as BlockDex

SkillWorks

Claude Code skills and plugins, scored

skillworks.kynth.studio

RuleStack

AGENTS.md gallery and agent-config comparison

rulestack.kynth.studio

ToolDrift

What the AI coding tools changed last night

tooldrift.kynth.studio

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

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

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

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

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

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

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex