Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Centered Multi Step Form Hero Block for React

A 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.

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 centered hero where the signup itself is the hero, for React with Base UI. Under a headline and one sentence, a raised wizard panel sits inside a tinted shell, a card in card. It walks the visitor through three steps: an account with a name and a work email, a plan picked from three choice cards, and a payment method. A row of dots with labels shows where they are, and each step has its own heading, a one-line explanation and real fields. Back, an outline Button, and Next, a ShineButton, move between steps. Next checks the step's fields first, and Finish hands over to a confirmation with a ShineButton link to the new workspace. Trust microcopy sits under the card. It's built from Steps, Field, Input, Radio Group, Shine Button, Button and Guides, with Lucide icons, Tailwind CSS and CSS transitions that stay still under reduced motion. Made for SaaS signups, onboarding and lead capture. The copy is for Moss Books, a made-up bookkeeping app: replace it with your own.

FAQ

How do I change the steps and their fields?

Edit the STEPS array. Each step has a label (under its dot), a title (its heading), a description and its fields. Each field has a label, a type, a keyboard (inputMode) and an autoComplete token, a placeholder, the pattern a valid value matches, the error shown when it doesn't, and wide for a full row instead of half of one. The plan step has no fields: it shows the PLANS choice cards. Add an entry to add a step; the dots and the step count follow the array.

How does each step check its fields?

Next is the form's submit button, so pressing Enter in a field moves on too. It tests the step's values against their patterns, with spaces removed, so a card number can be typed in groups. Each field that fails shows its error under it in FieldError, is marked invalid and described by the message, and focus goes to the first one. Finish checks every step, so a field emptied after going back sends the visitor to that step with its error. Typing in a field clears its error, and the dots ahead stay disabled until the steps before them pass.

How do I send the signup to my backend and take payments?

When the last step passes, submit moves to the confirmation: send values (the fields, by id) and plan to your backend there, and show the confirmation once it answers. Treat the card fields as layout only: for real payments, put your payment provider's hosted card fields or checkout in that step, so card numbers never reach your own server, and keep your server's own checks, since anything in the browser can be bypassed.

How do keyboard and screen reader users move through the wizard?

The dots are a list of tabs named "Signup steps", and each step is a panel named by its tab. After every move, focus goes to the new step's heading, never on load, and one polite live region says where the visitor is: "Step 2 of 3: Plan", then "Your books are open". The plan cards are a radio group, so the arrow keys change the plan without moving on. Every field has a visible label and an autocomplete token (name, email, cc-number, cc-exp, cc-csc), so browsers and password managers can fill it. The dots, the line between them and the Next button use the foreground color, so the block's only primary control is Next.

How is the card in card built?

The shell is a rounded-2xl border bg-muted/50 p-1.5 box and the panel inside it is rounded-xl bg-card shadow-lg ring-1 ring-foreground/15. In a light theme the card and the page are nearly the same color, so the tinted shell and the ring are what make the panel read as lifted. Both follow the theme, in light and dark. The page's rails and top rule come from the spine, so the wizard needs no lines of its own.

How does the wizard fit on a phone?

The panel takes the full width of the hero and reads down to 320px. The dots stay in one centered row with their labels under them, the card number takes a full row while the expiry date and the security code share one, and Back and Next stay on one row, at either end. Next is on the first screen for the account step. Below the sm breakpoint the headline wraps, balanced, at text-4xl.

When should I use a multi-step wizard instead of a single form?

Use a wizard when the signup needs more than four or five fields, or when they fall into groups that are easier to answer one at a time: each step feels short, and the dots show how little is left. Use a single form, such as an inline email signup, when one or two fields are enough to get started.

  • Pro

    A short centered waitlist hero with an email field and a Shine Button on one row inside a framed box, a confirmation in place, an avatar row and two trust points.

  • Pro

    A compact centered newsletter hero with the email field in a full-width band between two hairlines: a Shine Button subscribes, then a confirmation replaces the form, over a row of subscriber proof.

  • 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

    Split Signup Form Hero

    Signup and waitlist

    A split hero with a sign-up form on the page: copy and ticks at the start, and a card in card form at the end with a work email, a password and a Shine Button that shows a spinner, then a confirmation.

  • Pro

    A compact centred how-it-works hero for an invoicing app: a headline, a Shine Button with an outline action and trust copy over a closing band of three step cells, each with a small drawing of its screen.

  • Pro

    A centred showcase hero for a reporting workspace: the headline and a Shine Button, then a band between the rails with a fanned deck of three app windows (Dashboard, Analytics, Reports) that runs off its foot, masked.