Skip to content
v0.2.10

TimePicker

A segmented time field with an anchored, keyboard-accessible list of clock times.

Preview

Use TimePicker

TimePicker is a named export of @flood-md/react. Connect the package once, then import what you use.

First time here? Connect Flood
Example import style
time-picker.tsxTSX
"use client";

import { FloodRoot, TimePicker } from "@flood-md/react";
import "@flood-md/react/styles.css";

export function Example() {
  return (
    <FloodRoot>
      <TimePicker label="Start time" name="time" defaultValue="09:30" min="08:00" max="18:00" interval={1800} />
    </FloodRoot>
  );
}

Design notes

  • Interval and step use seconds; the list contains at most 1000 entries.
  • Manual entry remains available; this is wall-clock time without timezone conversion.
  • One flat list, with selected-time visibility and a trailing action aligned with DatePicker.

API reference

PropValuesDefault
labelstringRequired
hideLabelboolean—
valuestring—
defaultValuestring—
onValueChange(value: string) => void—
precision"minute" | "second"—
minstring—
maxstring—
stepnumber—
requiredboolean—
readOnlyboolean—
disabledboolean—
namestring—
formstring—
controlSize"sm" | "md" | "lg" | "xl"—
invalidboolean—
status"error" | "warning" | "success" | "info"—
descriptionstring—
segmentLabelsPartial<Record<"hour" | "minute" | "second", string>>—
messages{ required?: string; invalid?: string; outOfRange?: string; stepMismatch?: string }—
intervalnumber—
openboolean—
defaultOpenboolean—
onOpenChange(open: boolean) => void—
panelLabelstring—
openTimeLabelstring—
Native HTML propsOmit<Omit<HTMLAttributes<HTMLDivElement>, "defaultValue" | "onChange" | "children">, "end">Forwarded
View TypeScript source