Date and time

Time Field

A time-specific input that lets users enter and adjust time values, supporting 12-hour or 24-hour formats.

Basic

A time field allows users to input and adjust time values using a keyboard, with each segment of the time shown as its own editable unit.

Event time
1200AM

Installation

If you hit any issues, make sure you check out the installation guide here for more information.

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.

The Time Field comes packed with several components to enhance functionality and provide a seamless experience.

A form input specifically for entering and selecting dates, supporting various date formats and validation.
Field's a core piece every other component uses. It flexes reusable styles, showing up in inputs, labels, descriptions, and more.

Manual Installation

Make sure you also install the composed components and the required packages for the component to function properly.

Hour Cycles

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

Event time
1345

Prefix

A demonstration of how to add a prefix to the time field component for enhanced clarity or customization.

Event time
UTC
1200AM

Suffix

A demonstration of how to add a suffix to the time field component to provide additional context or customization.

Event time
1200AM

Validation

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

Event time*
––––AM

Controlled

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

11:45:00

Event time
1145AM

Readonly

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

Event time
1200AM

Disabled

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

Event time
––––AM