Fine-tune light, shadows, borders, neumorphic
Light and shadows
Borders
Neumorphic
Data

Scheduler <pm-scheduler>

Scheduler: a week or day calendar with events on an hourly grid (bookings, shifts, meetings).

Full screen

Props

<script type="module"> import '@prismora/css'; import '@prismora/elements/scheduler'; </script> <pm-scheduler label="Team calendar" date="2026-12-14" start-hour="8" end-hour="18" height="24rem" style="inline-size: 100%" events='[{"id":"1","title":"Stand-up","start":"2026-12-14T09:30","end":"2026-12-14T10:00"},{"id":"2","title":"Design review","start":"2026-12-14T10:00","end":"2026-12-14T11:30","tone":"secondary"},{"id":"3","title":"Customer call","start":"2026-12-14T10:30","end":"2026-12-14T11:00","tone":"success"},{"id":"4","title":"Lunch","start":"2026-12-15T12:00","end":"2026-12-15T13:00","tone":"neutral"},{"id":"5","title":"Sprint planning","start":"2026-12-16T14:00","end":"2026-12-16T16:00"},{"id":"6","title":"Release","start":"2026-12-17T00:00","end":"2026-12-17T23:59","allDay":true,"tone":"warning"},{"id":"7","title":"1:1 with Grace","start":"2026-12-18T15:00","end":"2026-12-18T15:45","tone":"info"}]'></pm-scheduler>

Overview

Overlapping events sit side by side, all-day events get their own row and a line marks the current time. It switches to one day when narrow. Every event is a button named with its title and times; each day has an "Add" button so new events do not depend on clicking the grid. The element shows events; your code stores them.

Attributes

AttributeTypeDefaultDescription
eventsSchedulerEvent[][]The events to show: { id, title, start, end, tone, allDay }. An array, or JSON in the attribute.
datestring—A day in the period to show, as YYYY-MM-DD (default today).
view'week' | 'day'weekweek (default) or day. Narrow containers always show one day.
start-hour
prop: startHour
number7First hour on the grid, 0 to 23 (default 7).
end-hour
prop: endHour
number20Hour the grid ends at, 1 to 24 (default 20).
week-start
prop: weekStart
number1First day of the week: 0 Sunday, 1 Monday (default).
labelstringCalendarAccessible name of the calendar.
localestring—Language for day and month names (default: the page language).
heightstring—Maximum height of the grid before it scrolls: any CSS length (default 32rem).
hide-weekends
prop: hideWeekends
booleanfalseLeave out Saturday and Sunday in the week view.

Also accepts the contextual attributes tone, surface, radius, density, motion, elevation. They are inherited from ancestors' data-* attributes.

Events

EventReact / Svelte propDescription
pm-event-clickonPmEventClickAn event was activated.
pm-slot-clickonPmSlotClickAn empty time was clicked, or a day's Add button was used. detail.start and detail.end are local ISO date-times.
pm-navigateonPmNavigateThe shown period or view changed.

CSS parts

PartDescription
::part(base)The whole calendar.
::part(bar)The row with Today, previous/next and the view switch.
::part(day)One day's time column.
::part(event)An event button.

Methods

step(), today()