# TimePicker

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

Connect Flood once using [the installation guide](https://flood.md/docs/installation). Then import the components you use; no per-component add command is needed.

## Example

```tsx
"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

| Prop | Values | Default |
| --- | --- | --- |
| `label` | `string` | `Required` |
| `hideLabel` | `boolean` | `—` |
| `value` | `string` | `—` |
| `defaultValue` | `string` | `—` |
| `onValueChange` | `(value: string) => void` | `—` |
| `precision` | `"minute" \| "second"` | `—` |
| `min` | `string` | `—` |
| `max` | `string` | `—` |
| `step` | `number` | `—` |
| `required` | `boolean` | `—` |
| `readOnly` | `boolean` | `—` |
| `disabled` | `boolean` | `—` |
| `name` | `string` | `—` |
| `form` | `string` | `—` |
| `controlSize` | `"sm" \| "md" \| "lg" \| "xl"` | `—` |
| `invalid` | `boolean` | `—` |
| `status` | `"error" \| "warning" \| "success" \| "info"` | `—` |
| `description` | `string` | `—` |
| `segmentLabels` | `Partial<Record<"hour" \| "minute" \| "second", string>>` | `—` |
| `messages` | `{ required?: string; invalid?: string; outOfRange?: string; stepMismatch?: string }` | `—` |
| `interval` | `number` | `—` |
| `open` | `boolean` | `—` |
| `defaultOpen` | `boolean` | `—` |
| `onOpenChange` | `(open: boolean) => void` | `—` |
| `panelLabel` | `string` | `—` |
| `openTimeLabel` | `string` | `—` |
| `Native HTML props` | `Omit<Omit<HTMLAttributes<HTMLDivElement>, "defaultValue" \| "onChange" \| "children">, "end">` | `Forwarded` |
