---
title: "Time Picker"
description: "Type a time, or turn wheels of hours, minutes, and AM or PM in a popup. Minute steps and limits keep the time in range."
url: https://gelatinui.com/components/time-picker
markdown_url: https://gelatinui.com/components/time-picker.md
access: free
install: "npx shadcn@latest add @gelatin-ui/time-picker"
registry_item: https://gelatinui.com/r/time-picker.json
version: "2026-11-09"
index: https://gelatinui.com/llms.txt
docs_index: https://gelatinui.com/docs/llms.txt
---

# Time Picker

> Type a time, or turn wheels of hours, minutes, and AM or PM in a popup. Minute steps and limits keep the time in range.

Page: https://gelatinui.com/components/time-picker

## When to use it

Best for: Typing a time or turning it on an hour, minute, second, and AM/PM wheel in a popup.

- Use it when people may type a time or turn it on a wheel.
- Use `minuteStep` and `hourStep` to show only the rows you allow.
- Use `minValue` and `maxValue` to disable the rows out of range.

## When not to use it

- For typing only, with no popup, use a [Time Field](https://gelatinui.com/components/time-field.md).
- For a date with a time, use a [Date Picker](https://gelatinui.com/components/date-picker.md).

## Notes for agents

- `TimePickerGroup` with no children renders a `DateInput` and a `TimePickerTrigger`.
- `TimePickerContent` with no children renders a `TimePickerWheel`: one drum column for each part of the time, in the order of the locale.
- `minuteStep` must be a whole number from 1 to 60, and `hourStep` from 1 to 24. Other values throw a `RangeError`.
- A turn of a wheel column sets that part and keeps the popup open. Enter closes the popup.
- Escape puts back the time from when the popup opened.
- Translate the name of the trigger with its `aria-label`. The default is "Choose time".
- The value type is `Time` from `@internationalized/date`.
- Pass `<TimePickerWheel />` in `TimePickerContent` yourself to set its props (`variant`, `className`). It reads the value, steps, limits, hour cycle, and seconds of the field.

## Anatomy

```text
TimePicker
├─ TimePickerLabel (0..n)
├─ TimePickerGroup (0..n)
├─ TimePickerTrigger (0..n)
├─ TimePickerContent (0..n)
├─ TimePickerWheel (0..n)
├─ TimePickerDescription (0..n)
└─ TimePickerError (0..n)
```

## API reference

### TimePicker

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `validate` | `function` |  | A function that returns an error message if a given value is invalid. Validation errors are displayed to the user when the form is submitted if `validationBehavior="native"`. For realtime validation, use the `isInvalid` prop instead. |
| `value` | `T \| null` |  | The current value (controlled). |
| `defaultValue` | `T \| null` |  | The default value (uncontrolled). |
| `aria-label` | `string` |  | Defines a string value that labels the current element. |
| `aria-labelledby` | `string` |  | Identifies the element (or elements) that labels the current element. |
| `aria-describedby` | `string` |  | Identifies the element (or elements) that describes the object. |
| `aria-details` | `string` |  | Identifies the element (or elements) that provide a detailed, extended description for the object. |
| `id` | `string` |  | The element's unique identifier. See MDN. |
| `name` | `string` |  | The name of the input element, used when submitting an HTML form. See MDN. |
| `form` | `string` |  | The `<form>` element to associate the input with. The value of this attribute must be the id of a `<form>` in the same document. See MDN. |
| `dir` | `string` |  |  |
| `lang` | `string` |  |  |
| `hidden` | `boolean` |  |  |
| `inert` | `boolean` |  |  |
| `translate` | `"no" \| "yes"` |  |  |
| `suppressHydrationWarning` | `boolean` |  | A React-only flag that suppresses the warning React normally logs when an element's server-rendered content doesn't match the client render during hydration. See React docs. |
| `onClick` | `MouseEventHandler<HTMLDivElement>` |  |  |
| `onClickCapture` | `MouseEventHandler<HTMLDivElement>` |  |  |
| `onAuxClick` | `MouseEventHandler<HTMLDivElement>` |  |  |
| `onAuxClickCapture` | `MouseEventHandler<HTMLDivElement>` |  |  |
| `onContextMenu` | `MouseEventHandler<HTMLDivElement>` |  |  |
| `onContextMenuCapture` | `MouseEventHandler<HTMLDivElement>` |  |  |
| `onDoubleClick` | `MouseEventHandler<HTMLDivElement>` |  |  |
| `onDoubleClickCapture` | `MouseEventHandler<HTMLDivElement>` |  |  |
| `onMouseDown` | `MouseEventHandler<HTMLDivElement>` |  |  |
| `onMouseDownCapture` | `MouseEventHandler<HTMLDivElement>` |  |  |
| `onMouseEnter` | `MouseEventHandler<HTMLDivElement>` |  |  |
| `onMouseLeave` | `MouseEventHandler<HTMLDivElement>` |  |  |
| `onMouseMove` | `MouseEventHandler<HTMLDivElement>` |  |  |
| `onMouseMoveCapture` | `MouseEventHandler<HTMLDivElement>` |  |  |
| `onMouseOut` | `MouseEventHandler<HTMLDivElement>` |  |  |
| `onMouseOutCapture` | `MouseEventHandler<HTMLDivElement>` |  |  |
| `onMouseOver` | `MouseEventHandler<HTMLDivElement>` |  |  |
| `onMouseOverCapture` | `MouseEventHandler<HTMLDivElement>` |  |  |
| `onMouseUp` | `MouseEventHandler<HTMLDivElement>` |  |  |
| `onMouseUpCapture` | `MouseEventHandler<HTMLDivElement>` |  |  |
| `onTouchCancel` | `TouchEventHandler<HTMLDivElement>` |  |  |
| `onTouchCancelCapture` | `TouchEventHandler<HTMLDivElement>` |  |  |
| `onTouchEnd` | `TouchEventHandler<HTMLDivElement>` |  |  |
| `onTouchEndCapture` | `TouchEventHandler<HTMLDivElement>` |  |  |
| `onTouchMove` | `TouchEventHandler<HTMLDivElement>` |  |  |
| `onTouchMoveCapture` | `TouchEventHandler<HTMLDivElement>` |  |  |
| `onTouchStart` | `TouchEventHandler<HTMLDivElement>` |  |  |
| `onTouchStartCapture` | `TouchEventHandler<HTMLDivElement>` |  |  |
| `onPointerDown` | `PointerEventHandler<HTMLDivElement>` |  |  |
| `onPointerDownCapture` | `PointerEventHandler<HTMLDivElement>` |  |  |
| `onPointerMove` | `PointerEventHandler<HTMLDivElement>` |  |  |
| `onPointerMoveCapture` | `PointerEventHandler<HTMLDivElement>` |  |  |
| `onPointerUp` | `PointerEventHandler<HTMLDivElement>` |  |  |
| `onPointerUpCapture` | `PointerEventHandler<HTMLDivElement>` |  |  |
| `onPointerCancel` | `PointerEventHandler<HTMLDivElement>` |  |  |
| `onPointerCancelCapture` | `PointerEventHandler<HTMLDivElement>` |  |  |
| `onPointerEnter` | `PointerEventHandler<HTMLDivElement>` |  |  |
| `onPointerLeave` | `PointerEventHandler<HTMLDivElement>` |  |  |
| `onPointerOver` | `PointerEventHandler<HTMLDivElement>` |  |  |
| `onPointerOverCapture` | `PointerEventHandler<HTMLDivElement>` |  |  |
| `onPointerOut` | `PointerEventHandler<HTMLDivElement>` |  |  |
| `onPointerOutCapture` | `PointerEventHandler<HTMLDivElement>` |  |  |
| `onGotPointerCapture` | `PointerEventHandler<HTMLDivElement>` |  |  |
| `onGotPointerCaptureCapture` | `PointerEventHandler<HTMLDivElement>` |  |  |
| `onLostPointerCapture` | `PointerEventHandler<HTMLDivElement>` |  |  |
| `onLostPointerCaptureCapture` | `PointerEventHandler<HTMLDivElement>` |  |  |
| `onScroll` | `UIEventHandler<HTMLDivElement>` |  |  |
| `onScrollCapture` | `UIEventHandler<HTMLDivElement>` |  |  |
| `onWheel` | `WheelEventHandler<HTMLDivElement>` |  |  |
| `onWheelCapture` | `WheelEventHandler<HTMLDivElement>` |  |  |
| `onAnimationStart` | `AnimationEventHandler<HTMLDivElement>` |  |  |
| `onAnimationStartCapture` | `AnimationEventHandler<HTMLDivElement>` |  |  |
| `onAnimationEnd` | `AnimationEventHandler<HTMLDivElement>` |  |  |
| `onAnimationEndCapture` | `AnimationEventHandler<HTMLDivElement>` |  |  |
| `onAnimationIteration` | `AnimationEventHandler<HTMLDivElement>` |  |  |
| `onAnimationIterationCapture` | `AnimationEventHandler<HTMLDivElement>` |  |  |
| `onTransitionCancel` | `TransitionEventHandler<HTMLDivElement>` |  |  |
| `onTransitionCancelCapture` | `TransitionEventHandler<HTMLDivElement>` |  |  |
| `onTransitionEnd` | `TransitionEventHandler<HTMLDivElement>` |  |  |
| `onTransitionEndCapture` | `TransitionEventHandler<HTMLDivElement>` |  |  |
| `onTransitionRun` | `TransitionEventHandler<HTMLDivElement>` |  |  |
| `onTransitionRunCapture` | `TransitionEventHandler<HTMLDivElement>` |  |  |
| `onTransitionStart` | `TransitionEventHandler<HTMLDivElement>` |  |  |
| `onTransitionStartCapture` | `TransitionEventHandler<HTMLDivElement>` |  |  |
| `onKeyDown` | `function` |  | Handler that is called when a key is pressed. |
| `onKeyUp` | `function` |  | Handler that is called when a key is released. |
| `onFocus` | `function` |  | Handler that is called when the element receives focus. |
| `onBlur` | `function` |  | Handler that is called when the element loses focus. |
| `onFocusChange` | `function` |  | Handler that is called when the element's focus status changes. |
| `autoFocus` | `boolean` |  | Whether the element should receive focus on render. |
| `style` | `StyleOrFunction<DateFieldRenderProps>` |  | The inline style for the element. A function may be provided to compute the style based on component state. |
| `children` | `ChildrenOrFunction<DateFieldRenderProps>` |  | The children of the component. A function may be provided to alter the children based on component state. |
| `slot` | `string \| null` |  | A slot name for the component. Slots allow the component to receive props from a parent component. An explicit `null` value indicates that the local props completely override all props received from a parent. |
| `validationBehavior` | `"aria" \| "native"` | 'native' | Whether to use native HTML form validation to prevent form submission when the value is missing or invalid, or mark the field as required or invalid via ARIA. |
| `render` | `DOMRenderFunction` |  | Overrides the default DOM element with a custom render function. This allows rendering existing components with built-in styles and behaviors such as router links, animation libraries, and pre-styled components. Requirements: - You must render the expected element type (e.g. if `<button>` is expected, you cannot render an `<a>`). - Only a single root DOM element can be rendered (no fragments). - You must pass through props and ref to the underlying DOM element, merging with your own prop as appropriate. |
| `hourCycle` | `12 \| 24` |  | Whether to display the time in 12 or 24 hour format. By default, this is determined by the user's locale. |
| `granularity` | `"hour" \| "minute" \| "second"` | 'minute' | Determines the smallest unit that is displayed in the time picker. |
| `hideTimeZone` | `boolean` |  | Whether to hide the time zone abbreviation. |
| `shouldForceLeadingZeros` | `boolean` |  | Whether to always show leading zeros in the hour field. By default, this is determined by the user's locale. |
| `placeholderValue` | `T` |  | A placeholder time that influences the format of the placeholder shown when no value is selected. Defaults to 12:00 AM or 00:00 depending on the hour cycle. |
| `minValue` | `TimeValue \| null` |  | The minimum allowed time that a user may select. |
| `maxValue` | `TimeValue \| null` |  | The maximum allowed time that a user may select. |
| `disabled` | `boolean` |  | Turns off the control: no focus, no edits, and the disabled look. |
| `readOnly` | `boolean` |  | The user can focus and read the value, but cannot change it. |
| `invalid` | `boolean` |  | Shows the invalid look and sets `aria-invalid`. |
| `required` | `boolean` |  | The form needs a value before it submits. |
| `onValueChange` | `function` |  | Runs on each change, with the new value and the Base UI change details. |
| `className` | `string` |  |  |
| `minuteStep` | `number` | 1 | The minutes the minute column shows: `5` gives 00, 05, 10 … 55, `15` gives 00, 15, 30, 45. A whole number from 1 to 60 (any other value throws). It only filters the column: typing still takes any minute. Add `validate` to reject one. |
| `hourStep` | `number` | 1 | The hours the hour column shows: `2` gives 12, 2, 4 … 10 (or 00, 02 … 22). A whole number from 1 to 24 (any other value throws). |

Also takes every prop of Base UI `Popover.Root`: https://base-ui.com/react/components/popover

### TimePickerLabel

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `render` | `DOMRenderFunction<"label", undefined>` |  | Overrides the default DOM element with a custom render function. This allows rendering existing components with built-in styles and behaviors such as router links, animation libraries, and pre-styled components. Requirements: - You must render the expected element type (e.g. if `<button>` is expected, you cannot render an `<a>`). - Only a single root DOM element can be rendered (no fragments). - You must pass through props and ref to the underlying DOM element, merging with your own prop as appropriate. |
| `elementType` | `string` |  |  |
| `className` | `string` |  |  |

### TimePickerGroup

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `className` | `string` |  |  |
| `rounded` | `"default" \| "full"` |  |  |
| `variant` | `"dashed" \| "default"` |  |  |
| `size` | `ControlSizeAtLeastSm` |  |  |
| `readOnly` | `boolean` |  | Read-only: the muted frame with no hover. Inside a `DateField` or `TimeField` the group reads it from the field; set it in a picker, which has no field state above the group. |

### TimePickerTrigger

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `ref` | `Ref<HTMLElement>` |  | Allows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref). |
| `className` | `string` |  |  |

Also takes every prop of Base UI `Popover.Trigger`: https://base-ui.com/react/components/popover

### TimePickerContent

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `className` | `string` |  |  |
| `arrow` | `boolean` |  | Show an arrow that points at the trigger. The gap grows from 4px to 8px. |
| `backdrop` | `boolean` |  | Put a clear layer under the popup (Base UI `Popover.Backdrop`), for example to dim it. |
| `showCloseButton` | `boolean` |  | Show a close button (a 24px ghost icon button) 10px from the top and the end. |
| `padding` | `"default" \| "none" \| "tight"` |  | `default`: radius 14, 12px padding and 10px between the parts, 288px wide. `tight`: 4px padding and 4px between the parts, as wide as the content: a row of 28px actions (a plain Toolbar) with the 4px inset of the bar recipe, 38px high (the selection pill of the Quote Reply). `none`: no padding and no gap, as wide as the content: a panel that lays out its own parts edge to edge (a head with a rule, a scroll box, a docked composer: the Chat Popup). Give it a width and a height with layout classes; the body fills that height. |
| `portalProps` | `Omit` |  | Other Base UI props of the inner parts. A `className` here adds to the component classes. |
| `positionerProps` | `PopupPartProps` |  |  |
| `backdropProps` | `PopupPartProps<PopoverBackdropProps>` |  |  |
| `arrowProps` | `PopupPartProps<PopoverArrowProps>` |  |  |
| `closeButtonProps` | `PopupPartProps` |  |  |
| `closeLabel` | `string` |  | The accessible name of the close button. Translate it with the page. |

Also takes every prop of Base UI `Popover.Popup`: https://base-ui.com/react/components/popover

### TimePickerWheel

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `layout` | `WheelLayout` |  | `drum` bends the rows on a turning wheel; `flat` only fades them. |
| `visibleItems` | `number` |  | How many rows show, an odd number (5 by default). |
| `labels` | `Partial<Record<TimeColumnType, string>>` |  | The spoken names of the columns. |
| `size` | `"default" \| "lg" \| "sm"` |  |  |
| `variant` | `"framed" \| "plain"` | "plain" |  |

### TimePickerDescription

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `render` | `DOMRenderFunction<any, any>` |  | Overrides the default DOM element with a custom render function. This allows rendering existing components with built-in styles and behaviors such as router links, animation libraries, and pre-styled components. Requirements: - You must render the expected element type (e.g. if `<button>` is expected, you cannot render an `<a>`). - Only a single root DOM element can be rendered (no fragments). - You must pass through props and ref to the underlying DOM element, merging with your own prop as appropriate. |
| `className` | `string` |  |  |
| `ref` | `Ref<HTMLElement>` |  |  |

### TimePickerError

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `id` | `string` |  | The element's unique identifier. See MDN. |
| `dir` | `string` |  |  |
| `lang` | `string` |  |  |
| `hidden` | `boolean` |  |  |
| `inert` | `boolean` |  |  |
| `translate` | `"no" \| "yes"` |  |  |
| `suppressHydrationWarning` | `boolean` |  | A React-only flag that suppresses the warning React normally logs when an element's server-rendered content doesn't match the client render during hydration. See React docs. |
| `onClick` | `MouseEventHandler<HTMLDivElement>` |  |  |
| `onClickCapture` | `MouseEventHandler<HTMLDivElement>` |  |  |
| `onAuxClick` | `MouseEventHandler<HTMLDivElement>` |  |  |
| `onAuxClickCapture` | `MouseEventHandler<HTMLDivElement>` |  |  |
| `onContextMenu` | `MouseEventHandler<HTMLDivElement>` |  |  |
| `onContextMenuCapture` | `MouseEventHandler<HTMLDivElement>` |  |  |
| `onDoubleClick` | `MouseEventHandler<HTMLDivElement>` |  |  |
| `onDoubleClickCapture` | `MouseEventHandler<HTMLDivElement>` |  |  |
| `onMouseDown` | `MouseEventHandler<HTMLDivElement>` |  |  |
| `onMouseDownCapture` | `MouseEventHandler<HTMLDivElement>` |  |  |
| `onMouseEnter` | `MouseEventHandler<HTMLDivElement>` |  |  |
| `onMouseLeave` | `MouseEventHandler<HTMLDivElement>` |  |  |
| `onMouseMove` | `MouseEventHandler<HTMLDivElement>` |  |  |
| `onMouseMoveCapture` | `MouseEventHandler<HTMLDivElement>` |  |  |
| `onMouseOut` | `MouseEventHandler<HTMLDivElement>` |  |  |
| `onMouseOutCapture` | `MouseEventHandler<HTMLDivElement>` |  |  |
| `onMouseOver` | `MouseEventHandler<HTMLDivElement>` |  |  |
| `onMouseOverCapture` | `MouseEventHandler<HTMLDivElement>` |  |  |
| `onMouseUp` | `MouseEventHandler<HTMLDivElement>` |  |  |
| `onMouseUpCapture` | `MouseEventHandler<HTMLDivElement>` |  |  |
| `onTouchCancel` | `TouchEventHandler<HTMLDivElement>` |  |  |
| `onTouchCancelCapture` | `TouchEventHandler<HTMLDivElement>` |  |  |
| `onTouchEnd` | `TouchEventHandler<HTMLDivElement>` |  |  |
| `onTouchEndCapture` | `TouchEventHandler<HTMLDivElement>` |  |  |
| `onTouchMove` | `TouchEventHandler<HTMLDivElement>` |  |  |
| `onTouchMoveCapture` | `TouchEventHandler<HTMLDivElement>` |  |  |
| `onTouchStart` | `TouchEventHandler<HTMLDivElement>` |  |  |
| `onTouchStartCapture` | `TouchEventHandler<HTMLDivElement>` |  |  |
| `onPointerDown` | `PointerEventHandler<HTMLDivElement>` |  |  |
| `onPointerDownCapture` | `PointerEventHandler<HTMLDivElement>` |  |  |
| `onPointerMove` | `PointerEventHandler<HTMLDivElement>` |  |  |
| `onPointerMoveCapture` | `PointerEventHandler<HTMLDivElement>` |  |  |
| `onPointerUp` | `PointerEventHandler<HTMLDivElement>` |  |  |
| `onPointerUpCapture` | `PointerEventHandler<HTMLDivElement>` |  |  |
| `onPointerCancel` | `PointerEventHandler<HTMLDivElement>` |  |  |
| `onPointerCancelCapture` | `PointerEventHandler<HTMLDivElement>` |  |  |
| `onPointerEnter` | `PointerEventHandler<HTMLDivElement>` |  |  |
| `onPointerLeave` | `PointerEventHandler<HTMLDivElement>` |  |  |
| `onPointerOver` | `PointerEventHandler<HTMLDivElement>` |  |  |
| `onPointerOverCapture` | `PointerEventHandler<HTMLDivElement>` |  |  |
| `onPointerOut` | `PointerEventHandler<HTMLDivElement>` |  |  |
| `onPointerOutCapture` | `PointerEventHandler<HTMLDivElement>` |  |  |
| `onGotPointerCapture` | `PointerEventHandler<HTMLDivElement>` |  |  |
| `onGotPointerCaptureCapture` | `PointerEventHandler<HTMLDivElement>` |  |  |
| `onLostPointerCapture` | `PointerEventHandler<HTMLDivElement>` |  |  |
| `onLostPointerCaptureCapture` | `PointerEventHandler<HTMLDivElement>` |  |  |
| `onScroll` | `UIEventHandler<HTMLDivElement>` |  |  |
| `onScrollCapture` | `UIEventHandler<HTMLDivElement>` |  |  |
| `onWheel` | `WheelEventHandler<HTMLDivElement>` |  |  |
| `onWheelCapture` | `WheelEventHandler<HTMLDivElement>` |  |  |
| `onAnimationStart` | `AnimationEventHandler<HTMLDivElement>` |  |  |
| `onAnimationStartCapture` | `AnimationEventHandler<HTMLDivElement>` |  |  |
| `onAnimationEnd` | `AnimationEventHandler<HTMLDivElement>` |  |  |
| `onAnimationEndCapture` | `AnimationEventHandler<HTMLDivElement>` |  |  |
| `onAnimationIteration` | `AnimationEventHandler<HTMLDivElement>` |  |  |
| `onAnimationIterationCapture` | `AnimationEventHandler<HTMLDivElement>` |  |  |
| `onTransitionCancel` | `TransitionEventHandler<HTMLDivElement>` |  |  |
| `onTransitionCancelCapture` | `TransitionEventHandler<HTMLDivElement>` |  |  |
| `onTransitionEnd` | `TransitionEventHandler<HTMLDivElement>` |  |  |
| `onTransitionEndCapture` | `TransitionEventHandler<HTMLDivElement>` |  |  |
| `onTransitionRun` | `TransitionEventHandler<HTMLDivElement>` |  |  |
| `onTransitionRunCapture` | `TransitionEventHandler<HTMLDivElement>` |  |  |
| `onTransitionStart` | `TransitionEventHandler<HTMLDivElement>` |  |  |
| `onTransitionStartCapture` | `TransitionEventHandler<HTMLDivElement>` |  |  |
| `style` | `StyleOrFunction<FieldErrorRenderProps>` |  | The inline style for the element. A function may be provided to compute the style based on component state. |
| `children` | `ChildrenOrFunction` |  | The children of the component. A function may be provided to alter the children based on component state. |
| `render` | `DOMRenderFunction` |  | Overrides the default DOM element with a custom render function. This allows rendering existing components with built-in styles and behaviors such as router links, animation libraries, and pre-styled components. Requirements: - You must render the expected element type (e.g. if `<button>` is expected, you cannot render an `<a>`). - Only a single root DOM element can be rendered (no fragments). - You must pass through props and ref to the underlying DOM element, merging with your own prop as appropriate. |
| `elementType` | `string` | 'span' | The HTML element type to render. Defaults to `'span'`. Set to `'div'` when using block-level children (e.g. `<ul>`) to avoid invalid HTML. |
| `className` | `string` |  |  |

## Styling

| Part | Slot | States | CSS variables | Tokens |
| --- | --- | --- | --- | --- |
| TimePicker | `time-picker` | `data-part` |  |  |
| TimePickerLabel | `time-picker-label` |  |  |  |
| TimePickerGroup | `time-picker-group` |  |  |  |
| TimePickerTrigger | `time-picker-trigger` |  |  |  |
| TimePickerContent | `time-picker-content` |  | `--anchor-width` |  |
| TimePickerWheel | `time-picker-wheel` |  | `--radius` |  |
| TimePickerDescription | `time-picker-description` |  |  |  |
| TimePickerError | `time-picker-error` |  |  |  |

## Usage

`TimePickerGroup` and `TimePickerContent` render their default parts when they have no children.

```tsx title="start-time.tsx"
import { Time } from "@internationalized/date";

import {
  TimePicker,
  TimePickerContent,
  TimePickerError,
  TimePickerGroup,
  TimePickerLabel,
} from "@/components/ui/time-picker";

export function StartTime() {
  return (
    <TimePicker defaultValue={new Time(9, 30)} minuteStep={15}>
      <TimePickerLabel>Start time</TimePickerLabel>
      <TimePickerGroup />
      <TimePickerError />
      <TimePickerContent />
    </TimePicker>
  );
}
```

## Compose

Rules:

- Compose the parts (`compose-parts`): Build each item from its named parts as children, and pass your text and icons in as parts.
- Every state is designed (`every-state`): Give each view of data its loading, empty, and error states: a skeleton in the final layout, an `Empty` with an illustration and one next action, and an error that says what failed and how to retry.

## Add it

```bash
npx shadcn@latest add @gelatin-ui/time-picker
```

It adds 60 registry items: 58 files, 8503 lines, and the npm packages `@base-ui/react`, `@internationalized/date`, `@mantine/hooks`, `@phosphor-icons/react`, `clsx`, `motion`, `react-aria-components`, `tailwind-merge`, `tailwind-variants`.

## Built on

- [Date Input](https://gelatinui.com/components/date-input.md)
- [Input Group](https://gelatinui.com/components/input-group.md)
- [Popover](https://gelatinui.com/components/popover.md)
- [Time Field](https://gelatinui.com/components/time-field.md)
- [Time Wheel](https://gelatinui.com/components/time-wheel.md)

## For AI agents

- Every item, one file: https://gelatinui.com/llms.txt
- MCP server (`search_items`, `get_item`, `get_install_plan`): https://gelatinui.com/mcp

## Related

- [Time Field](https://gelatinui.com/components/time-field.md)
- [Time Wheel](https://gelatinui.com/components/time-wheel.md)
- [Date Picker](https://gelatinui.com/components/date-picker.md)
- [Calendar](https://gelatinui.com/components/calendar.md)

## Keyboard

| Keys | Action |
| --- | --- |
| Alt + Down Arrow, Alt + Up Arrow | In a segment, opens the popup. |
| Enter, Space | On the trigger, opens the popup. |
| Up Arrow, Down Arrow | In a wheel column, turns one row and sets that part. In a segment, changes the value by one step. |
| Page Up, Page Down | In a wheel column, turns five rows. |
| Left Arrow, Right Arrow | In the popup, moves to the wheel column before or after. In a segment, moves to the segment before or after. |
| Home, End | In a wheel column, goes to the first or the last row that is not disabled. |
| Enter | In the popup, closes it. On an empty field it sets the time the wheel shows. |
| Escape | Closes the popup and puts back the old time. |

## Accessibility

The field is a React Aria time field, so people can type the time with no popup.

Alt+Down Arrow opens the popup from a segment. Each wheel column is one tab stop that the arrow keys turn.

Escape puts back the time from when the popup opened, and focus goes back to the trigger.

On a touch screen the popup takes the width of the field, and the wheel columns follow a flick.

## Motion

| Part | Motion |
| --- | --- |
| Open | popup · 150ms · ease-panel (0.2, 0.4, 0.2, 1) · fades in and scales from 95% |
| Close | popup-exit · 120ms · ease-out (0, 0, 0.2, 1) |
