label | string · requiredLabel text for the input (required for accessibility). |
|---|
isLabelHidden | boolean · default falseVisually hides the label while keeping it accessible to screen readers. |
|---|
description | stringDescription text displayed between the label and input. |
|---|
isOptional | boolean · default falseShows an "(optional)" indicator next to the label. Mutually exclusive with isRequired. |
|---|
isRequired | boolean · default falseMarks the field as required and sets aria-required. Mutually exclusive with isOptional. |
|---|
isDisabled | boolean · default falseDisables the input and suppresses interactions. |
|---|
disabledMessage | stringExplains why the input is disabled. With isDisabled, shows a tooltip on hover/keyboard focus and keeps the field focusable via aria-disabled (activation stays blocked). Use this instead of wrapping a disabled TimeInput in Tooltip. Disabled controls swallow the hover events an external Tooltip needs. |
|---|
value | ISOTimeStringControlled time value in ISO format (HH:MM or HH:MM:SS). |
|---|
onChange | (value: ISOTimeString | undefined) => voidCallback fired when the time changes. Receives undefined when the input is cleared. |
|---|
changeAction | (value: ISOTimeString | undefined) => void | Promise<void>Async action fired after onChange. Wrapped in a React transition to provide optimistic UI; triggers the loading spinner while pending. |
|---|
isLoading | boolean · default falsePuts the input into a loading state, displaying a spinner. |
|---|
min | ISOTimeStringMinimum selectable time in ISO format. Values outside the range are rejected. |
|---|
max | ISOTimeStringMaximum selectable time in ISO format. Values outside the range are rejected. |
|---|
hasSeconds | boolean · default falseIncludes seconds in the time display and parsing. |
|---|
hasClear | boolean · default falseShows a clear button when a value is set and the input is not disabled. |
|---|
hourFormat | '12h' | '24h' · default '12h'Controls the display format. '12h' shows AM/PM (e.g. '2:30 PM'); '24h' uses 24-hour notation (e.g. '14:30'). |
|---|
increment | number · default 1Number of minutes to add or subtract when the user presses the up or down arrow key. |
|---|
presentation | 'text-input' | 'popover' | 'bottom-sheet' | 'native' | 'adaptive-bottom-sheet' | 'adaptive-native' · default 'adaptive-native'Which surface selects the time. 'adaptive-native' (the default) uses Astryx's typed field on a fine pointer and the browser/OS input type=time on a coarse pointer — except hasSeconds or increment other than 1, which retain the typed field because iOS has no seconds wheel and treats step as validation rather than picker cadence; 'native' always uses the browser/OS control with no Astryx fallback; 'adaptive-bottom-sheet' uses the typed field on a fine pointer and Astryx's bottom-sheet time wheels on a coarse pointer; 'bottom-sheet' forces the wheels on every pointer; 'text-input' (like 'popover', which has no distinct TimeInput surface) keeps only the typed field. Native mode forwards min/max and enforces them on commit. hourFormat formats the closed value; the open OS picker follows the device locale. |
|---|
nativePicker | 'touch' | 'always' | 'never' · default 'touch'Deprecated: use presentation ('touch' = 'adaptive-native', 'always' = 'native', 'never' = 'text-input'). Still works exactly as released; presentation wins when both are set. |
|---|
placeholder | string · default 'Select a time'Placeholder text shown when no time is selected. When the input is focused and empty, a format hint overrides this text. |
|---|
size | 'sm' | 'md' | 'lg' · default 'md'Controls the height of the input element. |
|---|
status | {type: 'warning' | 'error' | 'success', message?: string}Status indicator that colors the border and displays an icon. When a message is provided it is rendered below the input. |
|---|
statusVariant | 'attached' | 'detached' | 'tooltip' · default 'attached'How the status message is placed relative to the input. attached overlaps directly below the input (bordered treatment); detached floats below as a separate element with spacing; tooltip hides the message box and surfaces it in a tooltip on the status icon. |
|---|
labelTooltip | stringTooltip text rendered as an info icon at the end of the label row. |
|---|
width | SizeValueWidth of the field (number = pixels, string used as-is, e.g. "100%"). Sizes the whole field (label, control, and status) so they stay aligned. |
|---|
xstyle | StyleXStylesStyleX styles for layout customization (margins, positioning, sizing). Must be a stylex.create() value, not an inline style object like style={{}}. |
|---|