Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Self-Assessment Coaching Contact Block for React

A coaching request that starts with three scored sliders: Career, Health and Relationships, each with a level meter, and a computed line naming where there is most room.

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 first-session request for React with Base UI, built as a self-assessment on ruled bands under a start-aligned header. Three bands hold one slider each (Career, Health and Relationships, scored 1 to 10), with a ten-step level meter and the number beside it. A fourth band names the area with most room, "Most room: Health", and shows the focus line the request will carry. The last band is split by a hairline that meets the band's rule with a + mark: at its start the meeting format (video, phone or in person, with a one-line note on each), and a note on what to change; at its end a name, an email, the submit button and the coach's email, phone and hours in an address. Submitting checks every field, shows each problem under its field and moves focus to the first one; a valid request turns into a confirmation in the same space that repeats the three scores and the focus line. The rails and top rule come from the Guides spine, so the block lines up with its neighbours in a stack. It's built from Slider, Segment Group, Field, Input, Textarea, Badge, Guides, Shine Button and Button, with CSS transitions for the entrances and your theme's tokens for every colour. For coaches, counsellors, mentors and any service that begins with where a person is today.

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 a call to your coach's inbox or booking tool: details holds the format, note, name and email, scores holds the three ratings in the order of AREAS, and focusLine(scores) gives the focus line. Show the confirmation when the request succeeds, and an error line in the form when it doesn't.

How is the area with most room chosen?

The lowest score wins. If two areas share the lowest score the line names both ("Most room: Health and Relationships") and the "Most room" badge shows on both bands; if all three scores are equal it names none and says "All three sit at 5", and the focus line reads "Focus: to choose together". The rule lives in roomLine and focusLine at the top of the file, so you can weight an area or add a fourth by editing AREAS. The scores are the visitor's own ratings, labelled as not a test, advice or a diagnosis.

What does the form check?

The form has noValidate, so the block shows its own messages. At least one slider has to be moved from its starting 5 (three untouched sliders are not an answer), a format has to be chosen, the note needs a sentence of at least 12 characters, the name can't be empty and the email needs an @ and a domain. A problem appears under its field, the control gets aria-invalid and a description that points to it, and focus moves to the first one: the first slider, if no score was given. Typing, moving a slider or choosing a format clears its message.

How do the sliders work for keyboard and screen reader users?

Each is a real slider named after its area, so arrow keys move one point, Home and End jump to 1 and 10, and a screen reader hears "8 of 10". The summary line follows the sliders as you drag, but nothing is spoken while dragging: one polite status line announces "Most room: Health. Focus: Health (3 of 10)." when a slider is let go. The level meter beside each slider is a drawing in CSS marked aria-hidden; the number carries the score. Each Slider points aria-labelledby at the band's heading; the end of a change is onValueCommitted.

What does the confirmation say, and who hears it?

It thanks the visitor by first name, repeats the email and the format, and lists the three scores and the focus line, so they can see what was sent. It is a status region that takes focus when it appears, so a screen reader reads it at once, and "Send another request" brings back an empty form with the sliders at 5 and puts focus on the form's heading. It promises nothing a server would have to keep.

How does it fit on a phone?

Each band stacks: the area's name with its meter and number on one line, the slider full width under it (the area's one-line hint and the "Most room" badge appear from md and sm). The summary's lines reserve their height, so no score change moves the form. Below lg the split stacks: format and note first, then name, email and the button at full width, and the contact details last; under 360 pixels their labels shrink to icons while screen readers still hear them. The email, phone and hours are fictional (.example is a reserved domain, 555-0100 to 0199 a reserved range): replace EMAIL, PHONE, PHONE_HREF and HOURS at the top of the file.

  • 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

    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 photography coverage planner on a card in card: a shoot type, a start time and a length slider that draw a bar on a 6 am to 10 pm timeline with a hatched golden hour, and a form that confirms in place.

  • Pro

    The calmest contact form, for a mail client: a centred heading and three fields on the page column with inline validation, a message counter and a one-line thank-you.

  • Pro

    A reverse split hero for a form builder: a builder window with a palette and a canvas of fields in a hairline frame with + marks, then a divider, the headline, three checks and a Shine Button.

  • Pro

    Request a Callback Contact

    Calls and meetings

    A callback request with a status band and a form that asks when to ring: as soon as possible, later today from a select of 15-minute times, or on a chosen day, with a time zone.