Ballmac UI home

Time Picker

A native time field with optional quick-pick presets and controlled or uncontrolled state.

Schedule a reminder

Pick a time that works for your day.

Installation

$ pnpm dlx shadcn@latest add @ballmac/time-picker

Usage

import { TimePicker } from "@/components/ballmac/time-picker"

The full example is in the Code tab above.

Examples

States and variants

API reference

PropTypeDefault
value

Controlled time in HH:mm format.

string—
defaultValue

Initial time when uncontrolled.

string""
onValueChange

Called with the new HH:mm time.

(value: string) => void—
label

Accessible name of the time field.

string—
presets

Optional shortcuts to common times.

TimePreset[][]

Also accepts the standard attributes of its root element.

Accessibility

KeyAction
Arrow keysEdits the native time field
Tab / EnterActivates a time preset

Use with AI

A native time field with optional quick-pick presets and controlled or uncontrolled state. With the shadcn MCP server set up (guide), ask your agent:

Add the Ballmac UI Time Picker (@ballmac/time-picker) to this project with the shadcn MCP, then use it where it fits.

Use it for

  • Schedule an appointment or reminder
  • Offer common meeting times as shortcuts

Not for

  • Use date-range-picker for a period across days

Registry JSON: https://ui.ballmac.com/r/time-picker.json

Credits

Free to use in personal and commercial projects.