Skip to main content
Mantı UI logoMantı UIv0.12.1
Studio

TimePicker

The machine manages parsing, the floating panel, and keyboard navigation across time columns.

import { TimePicker } from '@manti-ui/react';

export default function TimePickerBasic() {
  return <TimePicker label="Pickup time" variant="primary" defaultValue="12:30" />;
}

Sizes

size sets the control's height, padding, and type, and the portalled panel follows it down to the hour and minute cells.

API

PropTypeDefaultDescription
labelReactNodeOptional field label rendered above the control.
variantMantiVariant'primary'Selection-highlight variant for the active cells.
size'sm' | 'md' | 'lg''md'Control size. The portalled panel follows it, down to the hour and minute cells.
defaultValuestringInitial value as "HH:mm" (24-hour).
onValueChange(value: string) => voidCalled whenever the value changes; emits the formatted time string.
placementPlacement'bottom-start'Placement of the panel relative to the control.
disabledbooleanDisable the control.
readOnlybooleanMake the control read-only.
namestringForm field name.

Styling

Anatomy

PartSelectorDescription
root[data-scope="time-picker"][data-part="root"]The outer wrapper that owns the variant.
label[data-scope="time-picker"][data-part="label"]The optional field label.
control[data-scope="time-picker"][data-part="control"]The input plus trigger row.
input[data-scope="time-picker"][data-part="input"]The text input that holds the formatted time.
trigger[data-scope="time-picker"][data-part="trigger"]The button that opens the panel.
positioner[data-scope="time-picker"][data-part="positioner"]The floating wrapper that positions the panel.
content[data-scope="time-picker"][data-part="content"]The panel holding the hour/minute/period columns.
column[data-scope="time-picker"][data-part="column"]A scrollable column of cells for one unit.
cell[data-scope="time-picker"][data-part="cell"]A selectable hour, minute, or period option.

Tokens

TokenControls
--manti-time-picker-heightheight
--manti-time-picker-padding-xpadding x
--manti-time-picker-column-heightcolumn height
--manti-time-picker-content-paddingcontent padding
--manti-time-picker-cell-min-widthcell min width
--manti-time-picker-cell-padding-ycell padding y
--manti-time-picker-cell-padding-xcell padding x
--manti-time-picker-cell-radiuscell radius
--manti-time-picker-cell-font-sizecell font size

Last updated

Built end-to-end with Manti UI components and design tokens. Manti UI is a framework-agnostic design system on Zag.js.

GitHub