shadcn.io is not affiliated with official shadcn/ui
Consultant Availability Profile Block for React
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.
Installation
Overview
Show how busy an expert really is, with this consultant profile for React with Base UI. A compact header holds the title and a Native Select for the engagement: a strategy sprint of 12 hours a week, an advisory retainer of 4, or a workshop day of 8. Inside a hairline frame with a plus mark on each corner, the first band names the consultant and says when she is next open for the engagement you chose. The next eight weeks follow as cells on shared hairlines, each a radio with its date, a bar of the hours already booked out of the 20 she gives clients, the hours still free and a word: Earliest fit, Room for it or Too full. Weeks with no room can't be picked; a week with room fills solid when you press it. The foot, ruled by Guides, says when it starts and how many hours are still free that week, beside a Shine Button that requests it. Weeks count from a typed day, never the clock. It's built from Native Select, Badge, Avatar, Shine Button and Guides, with a CSS entrance only. For an expert marketplace, a consultancy's team page or any profile that sells time by the week.
FAQ
How do I fill it with real capacity?
Edit the constants at the top. CAPACITY is the hours a week she gives clients, and BOOKED lists the hours already booked in each of the next eight weeks, starting from the first Monday after AS_OF. ENGAGEMENTS lists each kind of work with the hours it takes of its first week. The free hours, the weeks that fit, the earliest fit and the counts are all worked out from those, so nothing is typed twice. In a real app read BOOKED from your calendar and set AS_OF from the server's date.
What does fits mean?
A week fits when the hours still free in it are at least the hours the engagement takes: 12 for a strategy sprint, 4 for a retainer, 8 for a workshop day. Change the engagement and the marks move at once, the count in the heading reads "2 of 8 fit", and a week you had picked that no longer fits is cleared with a line that says why. The foot's "still free" is the week's free hours less the engagement's.
What does Request this start do?
Nothing leaves the page. With a week picked it says Requested in this demo, nothing was sent, in the status line. Without one it says to pick a week with room first and moves focus to the earliest week that fits. The button is marked aria-disabled rather than disabled until a week is picked, so it keeps its place and stays focusable. To make it real, send the engagement and the week's Monday to your own API in the submit handler.
Is the board accessible?
The weeks are native radio buttons in a labelled group, so arrow keys move between the ones with room and the choice is announced as one of the group; weeks that are too full are disabled and read as unavailable. Each cell says "Week of" its date, its free hours and its word, so nothing rests on the bar or on a tone. The bars are decoration and hidden from assistive technology. The status line is a polite live region present from the start.
How does it look on a phone?
The eight weeks wrap two across instead of four, so each cell stays at least as wide as a thumb, and the status line and the request stay pinned to the bottom of the screen while you scroll. The date sits first in every cell, so nothing reads in a different order from the layout. The bars keep their direction in a right-to-left layout.
Related
- Pro
Mentor Availability Profile
Schedules and bookingA 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.
- Pro
Wedding Planner Date Check Profile
Schedules and bookingA 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
Therapist Booking Profile
Schedules and bookingA 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
Designer Availability Composer Profile
Schedules and bookingA 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
Lawyer Practice and Consultation Profile
Schedules and bookingAn 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
Personal Trainer Weekly Programme Profile
Schedules and bookingA 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.