Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Symptom Triage Contact Block for React

A visit request for a family clinic that opens on body-area toggles, shows an emergency notice in reserved space when chest is chosen, and takes an insurer you can type or pick.

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 visit-request section for React with Base UI, built for a clinic. A header band sits over a split with a hairline that meets the band's rule with a + mark. At the start, a form: a row of body-area toggles (head, chest, stomach, back, arms or legs), how long, an insurer you can type or pick from a short list, a member ID, your name and email, an optional note and a consent box that starts unticked. At the end, the clinic's details in an address: phone, email, hours and street, with a line that says to call 911 in an emergency. Choosing chest swaps a calm hint for an emergency notice in the same space, so the form never moves. The page's rails and top rule come from the Guides spine. It's built from Toggle Group, Select, Combobox, Field, Input, Textarea, Checkbox, Guides, Shine Button and Button, and every figure is example data: it gives no medical advice.

FAQ

How does the emergency notice appear without moving the page?

The hint and the notice share one grid cell. An unseen copy of the notice sets the height, so the cell is as tall as the notice at all times, and the visible content swaps between the two. The cell is a status region that is there from the start, so a screen reader hears the notice when chest is chosen and nothing before. The wording is "If this is an emergency, call 911": change it for your country's emergency number in Emergency.

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 booking system or inbox: details holds the areas, how long, the insurer, member ID, name, email, note and the consent. Keep real health information out of a demo, and send it only over a connection and to a system your clinic's privacy rules allow.

What does the form check?

The form has noValidate, so the block shows its own messages under each field and moves focus to the first problem. It needs at least one area, how long, a name, a plausible email and the consent box. The member ID is only required when an insurer other than Self-pay is entered, and it must be 6 to 14 letters and numbers. Fields with text check themselves when you leave them and clear as you fix them.

How does the insurer field work?

It takes anything you type and suggests the example plans as you do: nothing forces a match, because a plan missing from a short list shouldn't block a request. The list holds fictional plans and Self-pay; replace INSURERS with yours. The list is a Base UI Combobox on an array of names; typed text stays as it is.

How do the body-area toggles work for keyboard and screen readers?

They are a multiple-choice Toggle Group named "Where do you feel it?", so each toggle reports whether it is pressed and several can be on at once. A pressed toggle is filled with the foreground colour rather than the primary, which stays on the one button. If none is pressed on submit, the message appears under the row and focus moves to the first toggle.

How does it fit on a phone?

Below lg the parts stack: the header, then the form straight away, then the clinic's details under a rule with + marks. The toggles wrap onto a second row, the name and member ID fields go one per row, the button goes full width, and under 360 pixels the detail labels shrink to their icons (screen readers still hear them). The email and phone keep their order in a right-to-left layout.

  • Pro

    Patient Intake Steps Contact

    Visits and services

    A four-step new-patient intake on a card in card: who you are, history, consent signed on a pad or typed, and a review where each answer has an Edit button.

  • Pro

    Care Hours Planner Contact

    Visits and services

    A care-needs request where ticking kinds of help and setting their hours a week adds up a live weekly plan with a meter and a count of visits, on shared hairlines.

  • 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

    Insurance Check FAQ

    Calculators and tools

    A primary-care FAQ with an insurance check on a card in card: type the start of a plan and it answers in network with a copay, or out of network, above seven questions in an accordion.

  • 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

    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.