Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Sheet examples · Form

Multi-Step Form Sheet for React

A right-side setup sheet on step 1 of 3, with name and phone fields and Back and Next buttons in the footer.

Framework
UI library

The first step of a three-step setup in a right-side sheet. The description says where people are, Step 1 of 3: Personal Information, and Back and Next sit in SheetFooter. Keep the step in state to swap the fields and the description as people move through.

Preview

Preview width

Installation

Sign in to get your install command
Free with an account. It carries your token, so the CLI installs everything in one go.

FAQ

How does the sheet show the current step?

In SheetDescription, which reads Step 1 of 3: Personal Information. Change that text with the step so screen readers hear it when the sheet opens.

What does step 1 collect?

First Name, Last Name and Phone Number. The phone input uses type="tel", so phones show the number pad.

Do Back and Next change the step?

Not in this demo: both are plain Buttons. Keep the step number in state, render that step's fields, and disable Back on the first step.

Where do the answers go between steps?

Keep them in one object in state, or in a form library, outside the step's fields. Otherwise unmounting a step loses what was typed.

How does Start Setup open the sheet?

The button labeled Start Setup is the trigger, and its text is the accessible name. The Button goes in the render prop of SheetTrigger, and the label stays its child.

What does the setup sheet announce?

SheetTitle names the dialog for assistive tech, so every sheet renders one; hide it with sr-only when the design has no visible heading. It reads Account Setup, and the description gives the step.