components / availability-grid
availability-grid.
the weekly "when am i free" editor: a switch per day plus any number of time windows, with copy-to-open-days. inverted and overlapping windows are flagged inline and never silently corrected — rewriting what someone typed is how you ship a schedule they didn't ask for. exports isAvailabilityValid for the save button.
closed
closed
closed
5 windows across the week
installation
bunx @justin06lee/chrome@latest add availability-gridprops
| name | type | default | description |
|---|---|---|---|
| value * | AvailabilityRange[] | - | { weekday (0=sunday), startMin, endMin } in minutes past midnight. |
| onChange * | (ranges: AvailabilityRange[]) => void | - | |
| dayLabels | string[] | ['sunday', …, 'saturday'] | index-aligned to weekday. |
| weekOrder | number[] | [1,2,3,4,5,6,0] | row order; defaults to monday-first. |
| defaultRange | { startMin: number; endMin: number } | { 540, 1020 } | window added when a closed day is switched on. |
| stepMin | number | 15 | granularity of the time inputs. |
| disabled | boolean | false | |
| className | string | - |