Shadcn Event Calendar Drag-to-Book
Event calendar with drag-to-book appointments. Built by composing Avatar, Button, Card, Event Calendar, Event Calendar Content and 2 more. Uses date-fns alongside the shadcn primitives. A free, open source shadcn event calendar example you can install with npx shadcn@latest add @reui/c-event-calendar-5 and edit as your own code.
Event calendar with drag-to-book appointments
For AI Agents
Hand your agent this brief or the ReUI MCP, not a screenshot. Free to install.
Best for: A consultant's day from 9:00 to 18:00 where dragging over free time books a slot and overlapping draws are refused
When to use
- Team calendars in month, week, day and agenda views where events are added, edited and dragged
- Room and appointment bookings laid out as one column per resource or as a single day of open slots
- Project and campaign plans drawn as color coded bars spanning several days of a month
When not to use
- Appointments typed into a dialog with title, color, start and duration fields: use the Event Calendar Event Form Dialog example
- Several rooms or staff shown side by side as columns of one day: use the Event Calendar Room Bookings example
- A finished full page scheduling workspace, such as a hotel desk, shift roster or clinic: use the Event Calendar blocks
- A compact booking card where someone picks a day, then a free time slot, and confirms: use the Schedule blocks
- A plain date or date range input in a form, with no hours, events or dragging: use the Calendar component
Agent notes
bookSlotinserts a New appointment placeholder the moment a drag ends; open your booking form or call your API there insteadcanBookonly checks new draws, so moving or resizing an appointment onto another one is never refused- Client photos load from
randomuser.meURLs inbuildAppointments; swap them for your own images or dropAvatarImage - No example passes
onEventsChange, so drags, resizes andapiRefedits stay in calendar state and are lost on reload - New event ids come from a
useRefcounter that restarts at 0 on every mount, so take ids from your store once events persist
Third-party API docs
- date-fns v4: docs
https://reui.io/components/event-calendar/c-event-calendar-5.mdget_example("c-event-calendar-5")npx shadcn@latest add @reui/c-event-calendar-5Shadcn Components in Event Calendar Drag-to-Book
Dependencies
- date-fns
About Shadcn Event Calendar Drag-to-Book
Event calendar with drag-to-book appointments. Built by composing Avatar, Button, Card, Event Calendar, Event Calendar Content and 2 more. Uses date-fns alongside the shadcn primitives. A free, open source shadcn event calendar example you can install with npx shadcn@latest add @reui/c-event-calendar-5 and edit as your own code.
What You Can Build With Shadcn Event Calendar Drag-to-Book
- Composes Avatar, Button, Card, Event Calendar, so it drops into any project already using those components.
- Install it with the shadcn CLI: npx shadcn@latest add @reui/c-event-calendar-5
- Open source and free, with the full source on this page to copy or adapt.
More Shadcn Event Calendar Examples
- All Views Event calendar with all views and live settings
- Room Bookings Event calendar with resource view for room bookings
- Event Form Dialog Event calendar with create and edit dialog
- Custom Event Chips Event calendar with custom event chips
Related Shadcn Component Categories
Open-source shadcn form field components for form composition, validated inputs, and helper text.
Open-source shadcn file type icon components for file extensions, export formats, and file browsers.
Open-source shadcn file upload components for drag-and-drop uploads, multi-file flows, and upload progress.
Open-source shadcn filters components for filter bars, faceted search, and dashboard filtering.
Open-source shadcn frame components for embedded previews, app shells, and device mockups.
Open-source shadcn gantt components with split tree and timeline panes, drag scheduling, and progress rollups.
Frequently Asked Questions
When should I use Shadcn Event Calendar Drag-to-Book?
Use it for a consultant's day from 9:00 to 18:00 where dragging over free time books a slot and overlapping draws are refused.
Shadcn Event Calendar as a whole fits:
- Team calendars in month, week, day and agenda views where events are added, edited and dragged
- Room and appointment bookings laid out as one column per resource or as a single day of open slots
- Project and campaign plans drawn as color coded bars spanning several days of a month
For appointments typed into a dialog with title, color, start and duration fields, use the Event Calendar Event Form Dialog example. For several rooms or staff shown side by side as columns of one day, use the Event Calendar Room Bookings example. For a finished full page scheduling workspace, such as a hotel desk, shift roster or clinic, use the Event Calendar blocks. For a compact booking card where someone picks a day, then a free time slot, and confirms, use the Schedule blocks. For a plain date or date range input in a form, with no hours, events or dragging, use the Calendar component.
How do I install Shadcn Event Calendar Drag-to-Book?
Is Shadcn Event Calendar Drag-to-Book free to use?
Which components does Shadcn Event Calendar Drag-to-Book use?
Start building with ReUI Pro today.
Every Pro block, every style, and every future addition, with one license for unlimited projects.
From $249, once. Lifetime updates.