Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Class Queue Waitlist Contact Block for React

A waitlist for full classes: three session cells with the queue drawn as dots, your place shown when you tick one, and a form that confirms your place in place.

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 waitlist section for React with Base UI for a climbing gym's full classes. A start-aligned header opens on three session cells on shared hairlines (rows on a phone): each a checkbox, the class, its weekly slot, a "Full" badge and how many people are ahead of you, with the queue drawn as one dot per person. Ticking a session lights your own dot at the end of its queue and says "You would be 5th"; the line holds its space unticked, so nothing moves. Below, a ruled band takes name and email. Submitting checks that at least one session is ticked and that name and email are right, shows each problem and moves focus to the first one; a valid request turns that band into a confirmation ("You are 5th on Tue 7:00 pm", one line per session) in the same space while the sessions stay in view, locked, and now say "You are 5th". It's built from Checkbox, Badge, Field, Input, Guides, Shine Button and Button, with CSS transitions for the entrance and your theme's tokens for every colour. For gyms, studios, clinics and any place where classes sell out.

FAQ

How do I change the sessions and the queue lengths?

Edit SESSIONS at the top of the file: each has an id, a name, a weekly slot (written the way you write it) and how many people are ahead. Your place is that number plus one, written as an ordinal ("5th"). The queues are example data: bind them to your booking system, and add sessions freely, since the cells wrap to a row of three from md.

What are the dots?

A picture of the queue: one muted dot per person ahead and one filled dot for you that fades in when you tick the session. They are hidden from assistive technology; the same facts are in the cell's text ("Tue 7:00 pm, 4 ahead" and "You would be 5th").

Do the ordinals and times read correctly in right-to-left layouts?

The slot, the queue sentence and "You would be 5th" are each isolated with bdi, so the digits and the "th" stay together next to right-to-left text. Ordinals follow English rules here (1st, 2nd, 3rd); for other languages swap ordinal for Intl.PluralRules with your locale and its suffixes.

How do I use it with a keyboard?

Tab moves through the three checkboxes and Space ticks one; a click anywhere on a cell ticks it, because each cell is the label of its checkbox. Submit with Enter in a text field or by activating the button. Problems move focus to the first session checkbox, then the name, then the email.

Where does the request go?

Nowhere yet: the submit handler waits 800 milliseconds, then shows the confirmation. Replace the timer in submit with calls that add details to each ticked session's list, and read the real place from the response before showing it.

  • Pro

    A 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

    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

    Weekly Plan Fitness Contact

    Visits and services

    An 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

    Waitlist Signup Hero

    Signup and waitlist

    A compact waitlist hero: the copy beside a card-in-card email form that turns into a confirmation in place, with a closing band of three features coming at launch.

  • Pro

    A light waitlist CTA as a split between solid rails: the headline, a sentence and the email form with the Shine Button at the start, and a capacity panel at the end whose bar gets a You pin and a count that rolls up by one when you join.