Date and time

Time Field

A time-specific input that lets users enter and adjust time values, supporting 12-hour or 24-hour formats. It ensures accurate time selection with validation.

Loading...

Installation

Install the component via the CLI in one command.

npx shadcn@latest add @intentui/time-field

Composed components

When you install this component via the CLI, it automatically loads all composed components, so you don’t need to add them individually.

Manual installation

Use this approach if you prefer to install and wire up the component yourself instead of using the CLI.

npm install react-aria-components

Examples

Hour cycles

Change the hour format in the time field by using the hourCycle prop.

Loading...

Validation

To ensure the time field is properly filled out, use the isRequired prop.

Loading...

Controlled

In a controlled time field, the value is provided as a prop, and the field is not editable by the user.

Loading...

Readonly

In a readonly time field, the value is provided as a prop, and the field is not editable by the user.

Loading...

Disabled

A disabled time field cannot be interacted with and is visually represented as being inactive.

Loading...

Component API

TimeField

The TimeField component lets users enter time values.

PropTypeDefault
classNamestring-

TimeInput

The TimeInput component renders the segmented time input.

PropTypeDefault
classNamestring-

See the React Aria for the full API reference.

Unlock the full power of
Intent UI Design

Build modern web apps faster with 1000+ resources across components, blocks, patterns, templates, and starter kits.

Learn more