Skip to content
Elements / Data

schedule

binds state

Blocks laid out on time from a list: a week of shifts, the day's room bookings, an itinerary by hour (times as HH:MM), or a project plan across dates (view=timeline, dates as YYYY-MM-DD). Overlapping blocks sit side by side; it scrolls sideways when wide.

Spec · edit me

No problems. The parser accepted every line.

Result · try itOpen in playground
Tweak the props
view

Props

"text"textThe title above it, e.g. Support rota.optional
itemsexpressionThe list of records, e.g. items=shifts. At most 200.required
viewday · week · timelineday: one day down a time axis, a column per rows= value. week: a column per day, at most 7. timeline: dates across, a bar per item, with a Today line.week
datenameField with each item's day as YYYY-MM-DD. In a timeline, used for an item with no start date (a one-day bar).date
startnameField with the start: a time as HH:MM (09:30) in day and week, a date as YYYY-MM-DD in a timeline.start
endnameField with the end, written the same way. Missing: an hour after the start, or the same day in a timeline.end
labelnameField with what each block says, e.g. label=name.title
rowsnameField that splits blocks into lanes, e.g. rows=room: a column each in day view, a row each in a timeline; shown on the block in week view.—
tonenameField that colors each block: a value good, warn, bad, accent or muted uses that tone; other values (a team, a type) each get their own color, with a key.—
keynameThe field that identifies each item, e.g. key=id. Needed for bind=.id
bindstateState that holds the selected item's key. Pressing a block sets it.—
onactionActions to run after a block is pressed, with bind= already set, e.g. emit:changed. Separate several with ;—
ifconditionShow only when this expression is true, e.g. if=done or if={count>0}. Every element takes it.—
tipstringA short explanation shown on hover, keyboard focus or a tap, e.g. tip="Orders not yet shipped": for a term or a number some people won't know, instead of more words on screen. It makes the element a Tab stop if it isn't one. Every element takes it.—

SayShape v0.1 is an early prototype under the MIT License. Status · GitHub