Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Floor Plan Coworking Contact Block for React

A tour request for a coworking space that starts with a floor plan: four tappable zones with their vacancy, then a start date, a team size, a name and an email, checked against the zone 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 coworking tour request for React with Base UI, split by a hairline that meets the page's top rule with a + mark. At the start, a framed floor plan: four zones (hot desks, a quiet room, dedicated desks, private offices) are real radio buttons laid over the drawing, each with its desks drawn as small squares and its vacancy written out ("6 of 20 free"); choosing a zone fills its free squares and a line under the plan says who it fits. At the end, a compact header and the form: a start date in a date picker, the size of the team in a number field, a name and an email. Submitting checks every field, including the team against the zone (an office seats two to eight, six hot desks are free), shows each problem under its field and moves focus to the first one; a valid request turns into a confirmation in the same space while the plan stays in view. It's built from Radio Group, Date Picker, Number Input, Field, Input, Guides, Shine Button and Button, with your theme's tokens for every colour. For coworking spaces, studios, workshops and any place where the room you choose decides what you ask for.

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 your own call (your bookings inbox, a CRM or a form endpoint): details holds the zone, the start date, the number of people, the name and the email. The confirmation only repeats what the visitor sent and promises no reply time.

How do I change the zones and their vacancy?

Edit ZONES at the top of the file: each zone has a name, how many desks it has (total), how many are free (free), the fewest and most people one request may bring (min, max), a short note and place, where it sits over the plan from lg (start, top, width and height as percentages of the drawing). The squares are drawn from total and free, so they always match the words beside them. The figures in the demo are examples: read the real ones from your booking system and pass them in.

Is the plan a picture or a control?

Both, and the control comes first. The four zones are one radio group named "Zone", so arrow keys move between them and a screen reader hears "Hot desks, 6 of 20 free". The walls, the door and the desks are an inline drawing that is hidden from assistive technology, and the chosen zone is marked with a foreground ring and a filled radio, never the primary colour. The drawing is greyscale and has no photo.

Which dates can be picked?

Any day from today on except Sundays. The picker's isDateUnavailable reads the clock when the calendar opens, so it never shows a stale month, and the visitor can also type a date. To change the rule (closed on Mondays, or a lead time of a week), edit closed. The picked date is kept as year-month-day and written out in full in the confirmation. The date picker brings its own Ark UI calendar, so it installs without replacing this library's Calendar.

How does the form check what's entered?

The form has noValidate, so the block shows its own messages. On submit, problems checks that a zone is chosen, a start date is set, the number of people fits the zone, and the name and email are filled in (the email needs an @ and a domain). Each problem appears under its field with an icon, the control gets aria-invalid and an aria-describedby, and focus moves to the first one, which can be the first zone. Choosing a zone or typing in a field clears its message.

How does it fit on a phone?

Below lg the split stacks: the header, then the four zones as a 2 by 2 list of cards (the desk squares are left out), then the form, so the form starts well within the first screen and a half. The floor drawing only shows from lg, where each zone is laid over its place on it. Name and email go one per row below sm, the submit button goes full width, and nothing scrolls sideways at 320 pixels. The header and the form fade up once on load; with reduced motion they simply appear.

  • 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

    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

    A restaurant reservation in a card in card: a party size stepper, a date picker that closes Mondays and past days, five sittings as choices and a form that checks itself and confirms in place.

  • Pro

    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.

  • 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 place request for a day nursery in a card in card: a birthday in a segmented date field names the room the child belongs in, and five day toggles price the week at example rates.