Shows events on a day or week time grid that you move and resize.
Nov 22 – Nov 28, 2026
Sun22
Mon23
Tue24
Wed25
Thu26
Fri27
Sat28
event-calendar-demo.tsx
The CLI adds the files, packages, theme variables, and Tailwind plugin that this component uses. Before you run it, set up your project.
npm
yarn
pnpm
bun
team-week.tsx
EventCalendarOwns the visible date and view. Update events in onEventChange.
EventCalendarHeaderOptionalEventCalendarGrid
Wednesday, November 25, 2026
Wed25
event-calendar-day-demo.tsx
Update events in onEventChange.
Nov 22 – Nov 28, 2026
Sun22
Mon23
Tue24
Wed25
Thu26
Fri27
Sat28
event-calendar-edit-demo.tsx
Press Alt with the arrow keys to move the focused event. Also install Kbd & code.
Nov 22 – Nov 28, 2026
Sun22
Mon23
Tue24
Wed25
Thu26
Fri27
Sat28
- AltUpMove 15 minutes earlier
- AltDownMove 15 minutes later
- AltLeftMove one day earlier
- AltRightMove one day later
- AltShiftDownEnd 15 minutes later
- AltShiftUpEnd 15 minutes earlier
event-calendar-keyboard-demo.tsx
Tuesday, November 24, 2026
Tue24
event-calendar-overlap-demo.tsx
Set dayStart and dayEnd to show part of the day.
Nov 22 – Nov 28, 2026
Sun22
Mon23
Tue24
Wed25
Thu26
Fri27
Sat28
event-calendar-hours-demo.tsx
Also install Avatar.
Wednesday, November 25, 2026
Wed25
event-calendar-custom-demo.tsx
EventCalendar
- events: CalendarEvent[]Required
- The events to show. Each event has an id, title, start, end, and an optional color, isReadOnly flag, or label. Set label when renderEvent shows more than the title and time, so the accessible name includes that content.
- aria-label: stringRequired
- Names the scrollable region that holds the days.
- onEventChange: (event: CalendarEvent, range: { start; end }) => void
- Receives a move or a resize on release. Update events with the new range. Without it, events cannot move.
- view: "day" | "week"
- Shows one day or the seven days of the week, controlled.
- defaultView: "day" | "week" = "week"
- The view at first, uncontrolled.
- onViewChange: (view: "day" | "week") => void
- Called when the Day or Week button changes the view.
- date: CalendarDate
- Sets the visible date. Set onDateChange to let the header move it.
- defaultDate: CalendarDate
- Sets the visible date at first. The default is today, so pass it to keep screenshots stable.
- onDateChange: (date: CalendarDate) => void
- Receives requests from Today, Previous, and Next.
- timeZone: string = getLocalTimeZone()
- Places events in the grid with this time zone. Pass it in server rendering so both sides agree.
- step: number = 15
- Sets the snap size in minutes for a drag, a resize, a keyboard move, and a slot press.
- dayStart: number = 0
- Sets the first hour that the grid shows.
- dayEnd: number = 24
- Sets the last hour that the grid shows.
- scrollToHour: number = 8
- Scrolls the grid to this hour when it mounts.
- onEventAction: (event: CalendarEvent) => void
- Receives a press on an event. A drag does not call it.
- onSlotAction: (range: { start; end }) => void
- Receives a press on an empty slot with a range of one step.
- renderEvent: (event: CalendarEvent) => ReactNode
- Replaces the title and time inside an event. The accessible name stays the title and time.
- className: string
- Sets the width and the outer spacing.
EventCalendarHeader
Shows the title, Today, Previous, Next, and the Day and Week buttons. Pass children to replace them.
- children: ReactNode
- Replaces the default controls. Keep the title, the date buttons, and the view buttons reachable.
EventCalendarGrid
The scroll area with the time gutter, the day headers, the events, and the current-time line.
- children: ReactNode
- Replaces the grid content.