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-grid
props
nametypedefaultdescription
value *AvailabilityRange[]-{ weekday (0=sunday), startMin, endMin } in minutes past midnight.
onChange *(ranges: AvailabilityRange[]) => void-
dayLabelsstring[]['sunday', …, 'saturday']index-aligned to weekday.
weekOrdernumber[][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.
stepMinnumber15granularity of the time inputs.
disabledbooleanfalse
classNamestring-