Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Mentor Availability Profile Block for React

A mentor profile that books across time zones: slots set once in UTC, a zone menu, a month grid marking the days with times, times that roll into the next day where they must, and session types with prices.

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

Let a mentee book at a time that works where they live, with this mentor profile for React with Base UI. A compact header holds the title and a Native Select for the mentee's time zone. The mentor sets her slots once, in UTC, and the panel converts them. Inside a hairline frame with a plus mark on each corner, the first band names the mentor. A month grid follows, with a dot on every day that has times in the zone you chose and previous and next buttons for the three months ahead. Press a day and its times appear as chips in a Toggle Group: your time on top, hers in UTC underneath, with her weekday when the slot crosses midnight. In the end cell the session types are radio cards with their length and price, over a Data List that sets your time beside hers. The foot, ruled by Guides, holds a status line and a Shine Button that requests the session. It's built from Native Select, Toggle Group, Empty, Data List, Badge, Avatar, Button, Shine Button and Guides, with a CSS entrance only. For a mentoring platform, an office-hours page or any profile that books people across zones.

FAQ

How do I fill it with my own slots?

Edit the constants at the top. UTC_SLOTS lists the mentor's times in UTC for each weekday, TAKEN the ones already booked, and ZONES the zones a mentee can pick, each as an offset in minutes. KINDS lists the session types with their length and price. AS_OF is the day the page treats as today. The days with times, the converted times and the counts are all worked out from those, so nothing is typed twice. In a real app read the slots from your scheduler and let the mentee's own zone fill the menu.

How does a slot roll into the next day?

Each slot is an instant in UTC. For a zone the block adds its offset and files the result under the mentee's calendar day, so a 17:00 UTC slot on a Tuesday is 02:00 on Wednesday in UTC+9, and a 07:00 UTC slot is 23:00 the day before in UTC−8. The chip shows the mentee's time with the mentor's under it, and adds her weekday when it differs. Offsets are fixed, with no daylight saving, so use your own time zone library for real dates.

What does Request session do?

Nothing leaves the page. With a time picked it says Requested in this demo, nothing was sent, in the status line. Without one it says to pick a time first and moves focus to the times. The button is marked aria-disabled rather than disabled until a time is picked, so it keeps its place. To make it real, send the instant, the kind of session and the mentee's zone to your own API in the submit handler.

Is the month grid accessible?

It is a native table with a caption and column headings, and every day is a button named with its full date and how many times it has ("Tuesday 13 October, 3 times"), pressed when it is the chosen day. Days that have passed are marked unavailable. The grid is one tab stop; arrow keys move between days. A day with no times can still be picked, and the times area says so. The status line is a polite live region present from the start. On Base UI the chosen time is a pressed toggle.

How does it look on a phone?

The grid stays seven columns wide, the times wrap three across, and the session types and the summary stack under them. The grid is always six weeks tall, so changing the month moves nothing. The foot stays pinned to the bottom of the screen while the panel scrolls, and settles at the panel's end from the medium breakpoint. The grid keeps its left-to-right order in a right-to-left layout.

  • Pro

    Consultant Availability Profile

    Schedules and booking

    A consultant profile that shows capacity, not slots: eight weeks as cells with a bar of hours booked, an engagement menu that marks every week with room for it, and a request for the week you pick.

  • Pro

    Therapist Booking Profile

    Schedules and booking

    A sample therapist profile whose booking happens in the panel: three steps for the session, the time and the confirmation, an action foot with Back and one action, and a request that stays in the page.

  • Pro

    A wedding planner profile that checks a date: two months of dates on shared hairlines marked booked, held or free, each month tagged with its season, and three package cards priced with that season's uplift.

  • Pro

    A designer profile as an availability composer: the visitor's card on top re-renders as you choose a status, the engagements you take and the next opening, with Save and Discard that stay local.

  • Pro

    An attorney profile with a consultation request beside her practice areas: four areas as an accordion with matters won, settled and not won, and a request with a practice area menu, a matter field with a counter, a contact choice and a draft summary.

  • Pro

    A personal trainer profile as this week's programme: seven day tabs that say where each day stands, exercises with sets, reps and load and a Done checkbox on each, a week bar and a count worked out from the ticks.