Month grid of events: the +N more pill stretches into the day's tile, dragged events lift and dent the day under them, today sits in a ball.
DragDrag
Product team · 9 people
12 events in November
month-calendar, lively
Use it for anything read a month at a time: leave and attendance, project dates, bookings and
availability, content and send calendars. The grid is one 16 px tile cut into seven columns by 1 px
rims; every day keeps its number in a 24 px ball slot (today is filled primary) and stacks its
events as 22 px pills, a multi-day event as one pill per week row. A full day ends with a "+N more"
pill: press it and the pill grows into the day's tile, at least 240 px wide toward the free side
and kept inside the grid, with every title on one line; closing shrinks it back into the pill. Drag a pill (or press Space on it) and it lifts and
leans in the hand while the day under it dents; on release it lands with a put-down and the day's
other pills reflow calmly. For hours of a day or week use Calendar Scheduler
(same event shape, so one array feeds both); for picking one date use the
Date Picker.
pnpm dlx shadcn@latest add @motionkit-pro/month-calendarnpx shadcn@latest add @motionkit-pro/month-calendaryarn dlx shadcn@latest add @motionkit-pro/month-calendarbunx --bun shadcn@latest add @motionkit-pro/month-calendarRequires a Signature license and the @motionkit-pro registry with your token. See Installation.
import { type CalendarEvent, MonthCalendar } from "@/components/ui/month-calendar"
const initial: CalendarEvent[] = [
{
id: "leave-ada",
title: "Leave · Ada",
start: new Date(2026, 10, 2),
end: new Date(2026, 10, 5), // exclusive: covers 2, 3 and 4 November
allDay: true,
tone: "info",
},
{ id: "review", title: "Design review", start: new Date(2026, 10, 10, 10) },
]
export function TeamLeave() {
const [events, setEvents] = useState(initial)
return (
<MonthCalendar
events={events}
onEventChange={async (change) => {
await save(change) // reject or resolve false to throw the pill back
setEvents((list) => list.map((e) => (e.id === change.id ? { ...e, ...change } : e)))
}}
onDayCreate={(day) => openNewEventForm(day)}
/>
)
}Uncontrolled calendars take defaultEvents; month / defaultMonth / onMonthChange and
selected / defaultSelected / onSelect work either way. end is exclusive, as in Calendar
Scheduler. While a promise from onEventChange runs, the moved pill breathes with aria-busy; a
false result or a rejection throws it back to its day and shows one line under the header
("Design review could not be moved"). preset picks the layout: month (default, falls back to
agenda under 560 px of container width), mini (32 px cells with up to three tone balls, a pill
highlight on the selected day, the day tile under the card on click, off with dayTile={false}) or agenda (a week strip of day balls with the
selected day's events as 44 px tiles). maxVisible, weekStartsOn, locale (default en-GB),
showWeekNumbers, minDate / maxDate, renderEvent and labels shape the grid. now sets
today; without it the client's clock is read after hydration. actionsRef exposes
moveEvent(id, day), openDay(day) and closeDay() for guided tours; they never move focus.
temperament only changes the intensity of the motion: the calendar looks the same in all three.
Prop
Type
Also accepts all props of Omit<
ComponentProps<"div">,
"children" | "onSelect" | "defaultValue"
>.
A list-detail sidebar: the mini month on the left, the picked day's bookings beside it. Selecting a
day stretches the highlight pill to it; the list already shows the day, so dayTile is off.
DragDrag
Monday 9 November
month-calendar, lively
The phone layout: seven day balls with a pill highlight on the selected day, the day's shifts as tiles below. Arrow keys on the strip and the header arrows change day and week.
DragDrag
Ward rota · week 46
7 events in November
month-calendar, lively
MonthCalendar (data-slot="month-calendar"): root, header, polite live region and the portal
layer of the lifted pill (data-slot="month-calendar-lifted").data-slot="month-calendar-header"): month title, the status line (event count, the empty
hint or the error), Today (month-calendar-today), previous and next (month-calendar-prev,
month-calendar-next).data-slot="month-calendar-grid"): role="grid", a weekday row, six week rows.data-slot="month-calendar-day", data-date="2026-11-12"): the date ball, the pills
(month-calendar-event, data-id) and the "+N more" pill (month-calendar-more).data-slot="month-calendar-tile"): a Radix popover whose surface is clipped to the
"+N more" pill and opens from it; rows are month-calendar-tile-event.The grid is role="grid" labelled with the month ("November 2026"), weeks are rows, weekdays
columnheaders and days gridcells with aria-selected, aria-current="date" on today and a
label that counts the day's events ("Friday 13 November, 5 events"). Days use a roving tabindex; Tab
from the focused day reaches its events and its "+N more" pill (a <button aria-haspopup="dialog" aria-expanded>). The day tile is a Radix popover with focus moved inside and returned to the day on
close. Moves, refusals and month changes are announced in a polite live region ("Design review moved
to Thursday 12 November"). Pills are 22 px tall inside cells of at least 96 px; "+N" has a 24 px hit
area and header buttons are 32 px. Text on tone tints is foreground (AA in both themes); outside
month days dim only their numbers to muted-foreground and their pills' tint, never the event text.
Decorative parts (the dent, balls, highlight, the lifted copy) are aria-hidden.
| Keys | Action |
|---|---|
| Arrow keys | Move between days (the month changes at its edges) |
| PageUp / PageDown | Same day of the previous or next month (31 Jan goes to 28 Feb); Shift: year |
| Home / End | First or last day of the week |
| T | Goes to today |
| Enter | Opens the day tile with every event of the day, or creates on an empty day |
| Tab | From the focused day to its events and its +N more pill |
| Space (on an event) | Lifts the event; Space or Enter drops it |
| Arrow keys (event lifted) | Move the lifted event by a day or a week; the target day dents |
| Escape | Returns a lifted event to its day, or closes the day tile |
No lift, lean, dent squash or put-down: the dragged copy follows the pointer 1:1 and the moved
event crossfades into its new day; the target day still shows its ring rim. The day tile
fades in place with every row at full opacity, months crossfade without the cascade and today's ball fades in instead of
hopping.
Nothing runs at rest: no timers, no loops. Lanes and multi-day splitting are computed once per
events, month and maxVisible change in one pass per week row. During a drag only the copy's
motion values change per frame (transform and opacity, position: fixed); the day under the
pointer is found once per move with elementFromPoint. Pills reflow with Motion's layout animation
on the calm spring, measured only when their lane changes. The day tile mounts only while open and
grows with one clip-path number (no layout measured per frame). Our
code stays under 15 kB gzip; motion and @radix-ui/react-popover are peers, listed apart on the
technical sheet.
Main spring of each temperament. Set it with the temperament prop or MotionKitProvider; the default is lively.
Not measured yet · budget 15.0 kB gzip
Component and MotionKit helpers; excludes react, react-dom, motion, @radix-ui/react-popover.
drag, press, a value change
No lift, lean, dent squash or put-down: a moved event crossfades into its new day, the day tile crossfades in place, months crossfade and today's ball fades in.
Last 2 versions of Chrome, Edge, Firefox and Safari (iOS 16.4+)