components / interval-picker
interval-picker.
duration picker for "every n minutes" settings — quick presets in a roving-tabindex radiogroup plus a stepper for anything in between. always emits a plain minute count.
break reminder
min
nudging you every 50 minutes
installation
bunx @justin06lee/chrome@latest add interval-pickerprops
| name | type | default | description |
|---|---|---|---|
| value * | number | - | current interval, in minutes. |
| onChange * | (minutes: number) => void | - | fired with the new interval in minutes, already clamped to min/max. |
| presets | number[] | [15, 25, 50, 90] | quick-pick values in minutes. |
| min | number | 1 | lower bound in minutes. |
| max | number | 240 | upper bound in minutes. |
| step | number | 5 | amount the steppers and arrow keys move by. |
| unit | string | 'min' | unit shown after the custom value. |
| label | ReactNode | 'interval' | group caption; pass null to drop it. |
| disabled | boolean | false | |
| ariaLabel | string | - | accessible name for the preset group. |
| className | string | - |