Skip to content
Uxelith
Prov1.1.0Data

Event Calendar

A calendar people plan in: drag across time to make an event, drag to move it, pull its edge to resize, all snapping to 15 minutes. Week, day, month and rooms views, overlaps laid out, undo and full keyboard control.

Installs with Uxelith ProHow
Licence
Pro
Packages
3
Updated
12 Nov 2026
Live

Installation

Usage

example.tsx
"use client"

import { EventCalendar } from "@/components/event-calendar"

export function TeamCalendar() {
  return (
    <EventCalendar
      label="Team calendar"
      defaultDate="2026-11-11"
      resources={[
        { id: "atlas", title: "Atlas", meta: "8 seats" },
        { id: "harbor", title: "Harbor", meta: "4 seats" },
      ]}
      defaultEvents={[
        { id: "review", title: "Design review", start: "2026-11-11T10:00", end: "2026-11-11T11:30", resource: "atlas", people: ["Emily Carter"] },
        { id: "sync", title: "Roadmap sync", start: "2026-11-11T10:30", end: "2026-11-11T11:00", resource: "harbor" },
        { id: "offsite", title: "Team offsite", allDay: true, start: "2026-11-13" },
      ]}
      onEventsChange={(events, change) => console.log(change.type, change.event)}
    />
  )
}

Props

PropTypeDefaultDescription
events / defaultEventsCalendarEvent[][]Kept by you or by the component. An event has id, title, start and end as wall-clock strings ("2026-11-11T09:30", or dates for allDay), and optional color, resource, people and location.
onEventsChange(events, change) => void—Called after every create, move, resize, rename, recolour or delete, with the change (type, event, previous) so you can save just that one.
view / defaultView"week" | "day" | "month" | "resources""week"The view, kept by you or by the component. onViewChange tells you when it changes.
date / defaultDatestringtodayThe day in view, "2026-11-11". onDateChange tells you when it changes.
resourcesCalendarResource[][]Columns of the resources view (id, title, meta): rooms, people or machines booked side by side. resourcesLabel names the view ("Rooms").
labelstring—Accessible name.
canChange(change) => boolean—Veto a change, for example a room that is already booked.
readOnlybooleanfalseLook and open events, but no creating, moving or deleting.
hours / scrollToHour[number, number] / number[0, 24] / 8The hours shown, and where the day scrolls to when it opens.
snapMinutes / hourHeightnumber15 / 48What drags and keyboard moves snap to, and pixels per hour.
weekStartsOn / locale0 | 1 / string1 / "en-US"Sunday or Monday first, and how dates and times are written.
colorsstring[]five tintsThe colours offered in an event's details; new events take the first.
renderDetails(event) => ReactNode—Extra content in an event's details card, like a join link.

Accessibility

  • Every event is a button named with its title, day, time and room; Enter opens its details as a dialog, and Escape closes it and gives focus back.
  • Alt and Up or Down move an event by the snap, Alt Shift Up or Down change its length, Alt Left or Right move it a day or to the next room, Delete removes it.
  • Every change is announced through a polite live region, and Ctrl or Cmd Z or the toast's Undo takes it back.
  • Week, Day, Month and Rooms are tabs: Left and Right move between them; T goes to today and D, W, M and R switch views while the calendar has focus.
  • Dates and times come from the strings you pass, with no time zone, so the server and every browser render the same calendar.
  • On touch, press and hold creates or picks up an event, so a swipe still scrolls.
  • Under prefers-reduced-motion views, cards and the toast appear without moving.

Changelog

  1. v1.0.0Latest

    First release.

  2. v1.1.0

    No longer needs the motion package: the view pill glides on the same spring with the browser's Web Animations.

  3. v1.0.1

    Dates and times that can't be read no longer break the calendar: it opens on today and leaves those events out.

More in Data

All 15 in Data
  • DataPro

    Area Chart

    Trends over time: lines draw themselves in, the crosshair glides between points, the area you've scrubbed stays bright, and the tooltip shows the change from the point before.

  • DataFree

    Avatar Stack

    Overlapping avatars that spread on hover, with a name tooltip that swings with the pointer, status dots and a +N list of everyone else. Photos or initials.

  • DataPro

    Bar Chart

    A responsive bar chart, grouped or stacked: bars rise in one after another, the hovered column lights up and the tooltip glides, with keyboard navigation and a hidden data table.