ScheduleGrid: a rota you edit by drag or from the keyboard
ScheduleGrid is the kit's planner's table: people, rooms or machines as rows, days as columns, and the things in the cells moved between them by drag or from the keyboard. A template drops in from a strip, Alt makes a copy, and a cell that cannot take a shift says why before you let go.
By Bohuslav PoláčekChecked
What it is for, and what the preview shows
A week that someone plans: a rota, a machine plan, visits by day. The preview is Juniper Kitchen's rota for its Islington branch as the demo shows it on Wednesday 2 December 2026, rebuilt from the kit with the demo's people, shifts and money. Each day's header says how many places are still empty or that the day is covered; the days already past say nothing more. David Cooper is at 56 hours, over the 48-hour week the demo checks, and works at the Camden branch on Monday and Friday. Oliver Porter is off all week, his cells hatched as leave. Two Wednesday mornings follow late Tuesdays with 9 and 8 hours of rest, under the demo's 11, so they carry the warning glyph.
Under the people sit the footer rows: the day's labour, the expected takings and the share between them, against the demo's target of 25 to 35%. The shift templates wait in the strip under the grid, ready to drop into a cell. The grid keeps the kit's 56rem minimum and scrolls sideways inside its own frame when it is narrower; the demo gives a phone a list by day instead. The screen around it is the staff rota.
The rules, and where they live
- The manifest: use it for a rota, a machine plan or visits by day, as an editor and from the keyboard too; not for hours within a day (
TimeGrid,ResourceTimeline). It replaces "a hand-built rota table with drag and drop". - AGENTS.md, Apps do work: planning views are editors: drag, quick add in an empty cell, copy, live feedback, the same from the keyboard.
- docs/principles.md, Apps do work: see at once what a change does, what is missing and how many hours, and do all of it from the keyboard.
- docs/patterns.md, Time and planning: a planner's week of people and days, a refusal said before the drop, every step said aloud; and the rota per branch with its gaps, hours, hatched leave and quick add.
- scripts/check-markup.mjs:
bare-tablefails a hand-made<table>in an app, andown-scrollfailsoverflow-auto. - docs/audit.md, runtime rules:
horizontal-overflowfails a screen whose page scrolls sideways at 390px, which a seven-day table does unless it scrolls inside its own frame or turns into a list.
What AI coding tools write instead
An HTML table with drag and drop wired into its cells, as the manifest's replaces names it. What goes wrong:
- The drop happens first and the rule is checked after, so a shift lands on a day off and is then thrown back with an error. The kit's
refuseDropanswers while the shift is carried: the cell shows a danger ring with the reason in words, and a drop there nudges the shift back home. - There is no way to plan without a mouse. The kit's items and templates are buttons: Space picks one up, the arrows choose a cell, Space drops it, Alt with Space drops a copy, Escape cancels.
- The totals wait for a save, so nobody sees the hours or the cost change with the move. The grid's end column and footer are drawn from the app's data, so an optimistic
onDropmoves them at once. - The table is the app's own
<table>, which the markup check flags, and on a phone it pushes the page sideways.
A board does not fit either: a board keeps an order inside a column, while a cell here is a place, a row and a day, so the arrows move in two directions.
How to use it
columnsandrows:id,label(used in announcements) and an optionalheader; rows take agroupand anendcell, such as the week's hours;groups,cornerandendHeadername the rest.itemswithgetId,getLabel,getCell({ row, column }) andrenderItem;itemClassNamefor a pending look.cellBeforeandcellAfteradd what is not an item: leave, a shift at another branch, a quick add button.onDropreceives an item or a template and the cell;refuseDropreturns a reason or nothing;onRefusetells the person;allowCopyturns on Alt for copies.sources,sourcesLabel: the strip of templates.isMovablekeeps a paid shift in place;onResizeadds a grip that lengthens an item by whole days.footer: rows under the people with a figure per day and one at the end,totalfor the row that sums up.
Its entry in the manifest
| Manifest field | ScheduleGrid |
|---|---|
| What it is | A planner's table: people or machines by day, with things dragged between cells, templates and copies. |
| Use it for | A rota, a machine plan or visits by day: an editor, from the keyboard too. |
| Not for | For hours within a day (TimeGrid, ResourceTimeline) |
| It replaces | A hand-built rota table with drag and drop |
| Screen types | Workspace |
| Import | import { ScheduleGrid } from "@meadowstack-studio/kit"; |
Where it runs in the example apps
| Example app | Modules that render it |
|---|---|
| An app for a packaging and print company | Cutting dies |
| An app for a studio or agency | Capacity |
| An app for a construction company | Crews |
| An app for restaurants and venues | Shifts |
How the demo calls it
<ScheduleGrid<Shift>
label={caption}
corner={tx("Člověk", "Person")}
endHeader={
<>
{tx("Hodiny", "Hours")}
<span className="sr-only"> {tx("za týden", "per week")}</span>
</>
}
columns={days.map((day) => ({
id: day,
label: formatShortDay(day),
header: <DayHeader day={day} today={today} gaps={gaps.filter((gap) => gap.date === day)} />,
}))}
groups={(["kitchen", "floor"] as const).map((group) => ({ id: group, label: groupLabels[group] }))}
rows={rows.map((row) => ({
id: row.person.id,
label: row.person.name,
group: row.group,
// The face beside the name (framework v2, part 5: "tváře v rozpisu směn"); the name stays the label.
header: (
<span className="flex min-w-0 items-center gap-2">
<Avatar name={row.person.name} size="lg" decorative />
<span className="min-w-0">
<span className="block truncate text-sm font-medium text-fg">{row.person.name}</span>
<span className="block truncate text-xs text-fg-muted">{row.hint}</span>
</span>
</span>
),
end: <Hours hours={weekHours(weekShifts, row.person.id)} weeklyRest={rest?.weekly.get(row.person.id)} />,
}))}
items={items}
getId={(shift) => shift.id}
getLabel={(shift) =>
shiftName(shift, nameOf(shift.personId), facts.pendingTo(shift.id), rest?.daily.get(shift.id))
}
getCell={(shift) => ({ row: shift.personId, column: shift.date })}Questions
Can a shift be moved with the keyboard?
Yes. Tab to the shift, press Space to pick it up, choose a cell with the arrow keys and press Space to drop it, or Alt with Space for a copy. Escape cancels, and every step is announced with the person and the day.
How does a cell refuse a shift?
The app's refuseDrop returns a reason, such as a day of approved leave. While the shift is carried over that cell, the cell shows a danger ring and the reason in words; let go there and the shift goes back home, and onRefuse can show a toast.
Can it copy last week?
The grid copies single shifts with Alt. A whole week is the app's own action: the demo's rota has a Copy last week button that writes the shifts through the module, and the grid shows them as they arrive.
Does it work on a phone?
The grid keeps a 56rem minimum and scrolls sideways inside its own frame, never the page. The demo shows a phone a list by day instead.
Related
- A restaurant rota planned against the takingsScreens
- A dispatch plan that checks driving hours on every dragScreens
- A roast plan worked out from the ordersScreens
- Court bookings on a timeline you dragScreens
- GanttChart: a project schedule with its links and key datesComponents
- MonthCalendar: a month of things you move between daysComponents
Two ways
Build it yourself, or have it built
Build it yourself
Build your app on the framework
Get the codebase these apps stand on and build yours with Claude Code, Cursor or Codex.
One payment, lifetime updates
Get the frameworkHave it built
Have us build your app
Tell us how your team works. We plan the app with you and build it on the same framework at a fixed price.
After launch, Care keeps it improving, from €99 a month.
from €1,990
Describe your app