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.
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
Installation
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.
Related
- Create New Item SheetA right-side sheet for adding an item
- User Profile Edit SheetA right-side sheet for editing a username
- Accordion Form with Icon SectionsA form split into personal, contact and
- Contact Form SheetA right-side contact sheet with name
- Search and Filter SheetA right-side filter sheet with a search
- Article Preview SheetA right-side sheet previewing an article