fma-ui

Simple Time Picker

A button showing a time that opens a popover with columns for hours, minutes, seconds and AM/PM. Values are @internationalized/date Time objects (value/defaultValue/onChange), like the registry's DateField. granularity ("hour", "minute", "second"; default "minute") picks the columns and hourCycle={12} adds AM/PM. minValue/maxValue disable out-of-range options and clamp picks to the nearest allowed time. Each column is a react-aria ListBox: arrow keys and typing move within it, Tab moves between columns, Escape closes. For typed entry use DateField with granularity="minute" or react-aria's TimeField.

Formsthird-partyRegistry JSON

Installation

  1. 1

    Register the @fma-ui namespace in components.json (once)

    components.json
    {
      "registries": {
        "@fma-ui": "https://ui.fmartinsandre.dev.br/r/{name}.json"
      }
    }
  2. 2

    Add the item

    pnpm dlx shadcn@latest add @fma-ui/simple-time-picker

    Files land in components/fma-ui/simple-time-picker.tsx; npm and registry dependencies are installed along with them.

Dependencies

npm
@internationalized/date@^3.12.4cn@^0.4.0lucide-react@^1.52.0react-aria-components@^1.21.1
Registry
None