Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Month Calendar Scheduler Contact Block for React

A scheduling split: a host panel at the start; a month calendar that closes weekends and past days, the open times of the chosen day and a name and email at the end, with Confirm unavailable until a day and time are chosen.

Framework
UI library

Preview

Preview width

Installation

Part of Pro
Pro unlocks the code and one-line install of every Pro button and text effect, plus the MCP for your AI editor.
Have Pro already? Sign in to open it.Opens here as soon as you're Pro.

Overview

A scheduling section for React with Base UI, split by a hairline that meets the page's top rule with a + mark. At the start, a compact header, the host (an initials avatar, the length and place of the call, a fixed time zone) and what the call covers. At the end, a month calendar that closes weekends and every day before today, the open times of the chosen day as a row of choices, and a name and an email, each in a Field. The confirm button stays unavailable, with a line beside it saying why, until a day and a time are chosen. Submitting then checks the name and email, shows each problem under its field, marks the control invalid and moves focus to the first one; a valid request turns into a confirmation in the same space that names the day and time, takes focus, and offers "Book another time". The page's rails and top rule come from the Guides spine, so the block lines up with its neighbours in a stack. It's built from Calendar, Segment Group, Avatar, Field, Input, Guides, Shine Button and Button, with CSS transitions for the entrances and your theme's tokens for every colour. For sales demos, onboarding calls, office hours and any page where a visitor books time with a person.

FAQ

Where does the form send its data?

Nowhere yet. The submit handler waits 800 milliseconds, as a stand-in for a request, then shows the confirmation. Replace that timer in submit with a call to your calendar or booking API: day, time, name and email hold everything the visitor chose. Show the confirmation when the request succeeds, and an error line in the form when it doesn't.

Which days does the calendar close, and how does it know today?

unavailable closes Saturdays and Sundays and, once the page is in the browser, every day before today. Today is read after the block mounts, so the server's render never goes stale and no month or year is written into the file. The calendar opens on the current month, as the catalog's calendar does. Add your own closed days, such as holidays, to unavailable.

Where do the open times come from?

slotsOn filters the half-hour starts in STARTS with a small rule over the chosen date, so each day shows a different set and a taken start never appears. It's example data: in production, ask your calendar for the host's free times on that day and pass them in. The times are one group of radio choices, so arrow keys move between them and the chosen one fills with the foreground colour, never the primary colour.

Why is the confirm button unavailable, and can it still be focused?

Until a day and a time are chosen the button is marked aria-disabled and dimmed, and a line beside it says what's missing ("Choose a day to see its open times."). It stays focusable so keyboard and screen reader users can find the reason; pressing it sends focus back to the missing choice rather than submitting.

How does the calendar differ between libraries?

The calendar is one component built on react-day-picker: weekends and past days go in its disabled list, and the chosen date is a plain date.

The block turns each library's value into the same year, month and day.

How does it fit on a phone?

Below lg the split stacks: the header, then the form straight away, then the host and what the call covers. The calendar's cells shrink a size under sm, the times wrap to three a row, the name and email go one per row, and the confirm button goes full width, so nothing scrolls sideways at 320 pixels.

  • Pro

    Stylist Booking Contact

    Visits and services

    A salon booking that starts with the person: three stylists in hairline cells, each with their next three openings as chips, a live appointment line, and a form that checks itself and confirms in place.

  • Pro

    Request a Callback Contact

    Calls and meetings

    A callback request with a status band and a form that asks when to ring: as soon as possible, later today from a select of 15-minute times, or on a chosen day, with a time zone.

  • Pro

    An interview scheduler where the candidate ranks up to three of eight offered times, reorders them with buttons, and picks a time zone from a searchable list, in two cells that share their hairlines.

  • Pro

    Enterprise pricing by conversation: a scheduler with a strip of the next five working days and a grid of time slots in the visitor's own time zone, then a confirmation.

  • Pro

    A talk-to-sales split for a scheduling platform: what happens next as three numbered steps and a band of contact details beside a form that checks itself, shows each problem under its field and confirms in place.

  • Pro

    A coaching request that starts with three scored sliders: Career, Health and Relationships, each with a level meter, and a computed line naming where there is most room.