SearchCtrlK

  • ↑↓navigate
  • ↵open
  • escclose

Can’t find it? Contact us

Schedule foundations

What @sdxc/ui/schedule is for, the rules its parts share, and every variable it reads.

The parts of a calendar app: a time grid of days and hours, a month, an agenda, a phone's strip of days, and a people-by-hours grid for finding a time.

They draw what the server places: days are `YYYY-MM-DD` strings and times are minutes of the day, so the app decides the zone and the parts never guess it.

typescript
import "@sdxc/ui/theme.css";
import { … } from "@sdxc/ui/schedule";

When to reach for it

  • A day, three-day or week calendar whose events can be dragged, resized and created.
  • A month or agenda over the same events, and a phone layout with a strip of dates.
  • Comparing several people's busy times to offer a meeting slot.

Shared ideas

  • Placed on the serverOverlapping events split their cluster into columns, and all-day spans stack into rows, before any script runs.
  • Edits post formsA drag or an Alt+arrow move fills the grid's edit form with date, start and end, so a no-script form does the same job.
  • Zones as columnsEach zone is a column of hour labels the app reads for that day, so a second zone shows its own DST offset.
  • A moving now lineThe server draws the present minute, and the island moves it on from the instant it was read, even on a cached page.
  • Opens on the dayThe grid opens scrolled to scrollTo, and keeps its scroll when a post redraws it.
  • Phones get their own viewDayStrip scrolls inside its own box, and a month narrows its days to dots without widening the page.

CSS variables

Every custom property the namespace reads or declares, with its default and what it controls.

Reads the neutral role for hairlines, labels and off-hours tint, and brand for today, the current day and a default event colour; each event tints itself from its own colour. The roles are documented on Theming.

Scale and colour

None is declared in theme.css; set any of them on a part or an ancestor.

VariableDefaultWhat it controls
--ui-time-grid-hour3remOne hour's height in a TimeGrid, which every event's offset and length multiplies.
--ui-time-grid-gutter3.5remThe width of each time zone's column of hour labels.
--ui-time-grid-nowvar(--ui-danger-bg-solid)The now line and its dot.
--ui-day-strip-cell3remThe width of each day in a DayStrip; widen it for longer notes such as amounts.
@sdxc/ui

Can’t find it? Contact us