Skip to content

Time Input

The TimeInput component provides a styled time input field. It is built on top of BaseInput, using the same cn-input-container foundation as TextInput and NumberInput, and hides the browser’s native clock indicator in favour of a configurable IconV2 leading icon.

Playground

Controlled

Pass value together with onChange to control the input. onChange receives the change event — read e.target.value for the new time.

Installation

import { TimeInput } from "@harnessio/ui/components";
<TimeInput
label="Start time"
id="start-time"
defaultValue="09:30"
caption="Select a time"
/>;