shadcn.io is not affiliated with official shadcn/ui
Session picker Contact Block for React
A retreat request with session rows across three days, a capacity bar on each, a room choice, and a running example total for the nights.
Installation
Overview
A stay request for Hushpine Retreat, built for React with Base UI. Six sessions across Thursday, Friday and Saturday sit in one Toggle Group. Each row shows how many places are open and a Progress bar of how full it is; Cold plunge is full and can't be picked. A Radio Group chooses Shared, Private or Commuter, and the example total is three nights at that rate plus any session extras, or a day rate for a commuter. Dietary Checkboxes are optional. On a phone the total follows the rooms. Submitting checks that a session, a name and an email are set, then confirms in the same cell. It's built from Field, Input, Toggle Group, Radio Group, Progress, Checkbox, Badge, Guides, Shine Button and Button. The rates are examples.
FAQ
Where does the form send its data?
Nowhere yet. The submit handler waits 800 milliseconds, then shows the confirmation. Replace that timer in submit with your own call. The request is the session ids, the room, the optional dietary ids, the name and the email. The total is worked out in the page from SESSIONS, ROOMS, NIGHTS and DAY_RATE; it is an example, not a charge.
How does the session picker work?
One Toggle Group holds every session, and a row can be on or off. The day is written on the row. Open places are capacity minus the seats already taken, and the bar fills by seats taken. A session with no open places is disabled and badged Full. At least one session is required; the message sits under the list and focus moves there.
How is the example total worked out?
Shared is $180 a night and Private is $340, each times three nights, plus any extra on a chosen session (Breath studio $40, Hearth cooking $55; the others say Included). Commuter has no lodging: $95 times the number of distinct days among the chosen sessions. With no session chosen, a commuter total stays at $0 and the line says to pick a session to price the days. The total is a status region from the start, so a change can be announced. The caption says the rates are examples.
How does the form check what's typed?
The form has noValidate. On submit, problems checks that a session is chosen, that a name is present, and that the email has an @ and a domain. Dietary notes are optional and never block sending. Each problem appears under its control with an icon, and focus moves to the first one. Choosing a session, or typing, clears that message. Shared is the room to start, so the room always has a value.
What does the confirmation say?
It thanks the visitor by first name and repeats the room, the number of sessions, the example total, and, when any were ticked, how many dietary notes. It's a status region that takes focus, and "Plan another stay" clears the sessions and the fields and puts focus on the sessions heading. The one-business-day reply stays under the button.
How does it fit on a phone?
Below lg the columns stack: the sessions, then the rooms, the total, the dietary notes and the fields. Dietary notes go two by two. The submit button goes full width, and under 360 pixels the contact labels shrink to their icons. The header fades up once; with reduced motion it simply appears. stay@hushpine.example and +1 (555) 010-0184 are fictional.
Related
- Pro
Treatment Menu Tabs Contact
Visits and servicesA day spa treatment menu: pill tabs over radio cells for massage, facial and body treatments, add-ons as checkbox cells, a running total and a form that checks itself and confirms in place.
- Pro
Stylist Booking Contact
Visits and servicesA 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
Shift Picker Volunteer Contact
Events and datesA volunteer sign-up on ruled bands: four days of shift cells with spots left, skills as toggles, a commitment control and a form that confirms in place.
- Pro
Weekly Plan Fitness Contact
Visits and servicesAn intro-session request for a gym with a plan that draws itself: a goal as four choice cards, a level, sessions a week, and a framed week whose days light up and whose readout says '3 sessions, 50 minutes'.
- Pro
Booked Dates Wedding Contact
Events and datesA date enquiry for a wedding planner that shows the calendar first: a season band, an inline calendar with booked and too-soon days crossed out, guests, a venue style and contact details.
- Pro
Month Calendar Scheduler Contact
Calls and meetingsA 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.