Simal UI
Components

TimeField

A time input that accepts typing and offers a scroll-wheel picker.

Web-only — the native half lives in time-field.native.tsx and uses the platform picker instead.

It matches Field in height and label treatment so a time sits in a form grid beside text inputs. minimumTime does not clamp the value; it marks a time earlier than the minimum as next-day, which is what a shift or booking range actually needs.

Import

import { TimeField } from '@simal/ui/nativewindui';

Props

PropValuesDefaultDescription
label"Start time"Sits above the trigger. Optional — omit it and the trigger stands alone.
errorAny non-empty string turns the label red and renders the message below.
minimumTimeA time earlier than this is treated as the following day and annotated as such, rather than being rejected. Use it for an end time that may cross midnight.
valueControlled, and a real Date — only the time part is read.
onChangeRequired. Receives a new Date with the chosen time.

Examples

Start And End

A start and end pair is the usual shape, and the reason minimumTime exists.

Crosses Midnight

An end time before the start reads as next-day rather than as an error.

With Error

On this page