shadcn.io is not affiliated with official shadcn/ui
Patient Intake Steps Contact Block for React
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.
Installation
Overview
A new-patient intake for React with Base UI. A start-aligned header sits over a card in card, a muted shell with + marks on its corners around a raised panel. Along the top of the panel, four steps in a numbered row: You (a name, a date of birth in a segmented date field, an email), History (conditions to tick and an allergies switch that opens a field), Consent (a tick, then a signature drawn on a pad or your full name typed) and Review (every answer in a list, each with an Edit button). Back and the one Shine Button, Next, sit in a bar under the panel; on the last step it becomes Send intake. Each step checks its fields before Next, and the card keeps one height whichever step is open. It's built from Steps, Date Input, Checkbox, Switch, Signature Pad, Field, Input, Guides, Shine Button and Button. Example only: don't type real health details.
FAQ
Where does the intake go?
Nowhere yet. Send waits 800 milliseconds as a stand-in for a request and then shows the confirmation. Replace that timer in submit with a call to your patient system: details holds every answer, and the pad can hand you its image in onDrawEnd through getDataUrl("image/png") (the demo only counts strokes). Handle real health data only in a system your privacy rules allow.
How do the steps work?
Next checks the current step and only then moves on; an answer never advances by itself, and Enter in a field does what Next does. The step row is navigation too, but only up to the furthest step you have reached, so you can go back and forward without skipping ahead. After each move, focus lands on the new step's heading and a polite status says "Step 2 of 4: History". Send re-checks everything, and if an earlier step is no longer right it reopens that step.
Why doesn't the card change height between steps?
An unseen copy of all four panels sits in the same grid cell as the live one, so the cell is as tall as the tallest panel at every width. The unseen copies are inert and hidden from assistive technology, use their own ids, and swap the date field and the signature pad for blank boxes of the same size. The allergies field is counted as open in that copy, so switching allergies on adds nothing.
How can someone who can't draw sign?
The pad takes a pointer or a finger, and it is labelled as a signature pad with a Clear button. Keyboard and screen reader users, and anyone who would rather not draw, type their full name in the field beside it: that field is required whenever the pad is empty, and a drawn signature makes typing optional. Either one is accepted and the review says which was used.
Is anything ticked for me?
No. The consent box and every condition start unticked, and the allergies switch starts off. Conditions are optional; allergies need a note only if the switch is on; consent is required, with its text next to it.
How does it fit on a phone?
The step row keeps its numbers and drops the names below md (screen readers still hear them). The conditions go one per row, the name, date and email fields stack, and the pad keeps its 160 pixel height with the typed-name field under it. Nothing scrolls sideways at 320 pixels, and in a right-to-left layout the Back chevron and the panels' slide mirror.
Related
- Pro
Symptom Triage Contact
Visits and servicesA 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.
- Pro
Conflict Check Enquiry Contact
Calls and meetingsA new-matter enquiry for a law firm on a card in card: other parties as chips for a conflict check, urgency, a voicemail switch and an engagement acknowledgement signed on a pad or typed.
- Pro
Supplier Application Contact
ApplicationsA supplier application split in two: a code of conduct as a ruled list at the start, and at the end a form with a formatted tax ID, certification chips and a signature.
- Pro
Centered Multi Step Form Hero
Signup and waitlistA centered signup hero whose form is a three-step wizard in a card in card, account, plan and payment, that checks each step's fields before the next and ends on a confirmation.
- Pro
Wizard FAQ
Steps and plansA FAQ that shows one question at a time for an analytics tool: a numbered step list, the active question and answer, and Previous and Next buttons in a card in card.
- Pro
Talk to Sales Contact
Contact formsA 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.