Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Sheet examples · Settings

Account Settings Sheet for React

A right-side sheet for changing the account email and password, with a Save Changes button in the footer.

Framework
UI library

An email field and two password fields in a right-side sheet, with Save Changes pinned to the bottom in SheetFooter. Each label and input share a Field, so the label names the input. Wire the save to your account API; nothing is sent until it's pressed.

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

Which fields does this account sheet collect?

Email Address, an email input that starts with john@example.com, then Current Password and New Password, two password inputs that start empty. Each sits in a Field with its FieldLabel, inside a FieldGroup.

Does Save Changes close the sheet?

No. Save Changes is a plain full-width Button in SheetFooter, with no form around the fields, so the panel stays open. To close it after saving, control the open state: Pass open to Sheet; onOpenChange receives the next boolean.

Why is there a SheetTitle on this settings sheet?

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 Settings, with Manage your account information as the SheetDescription.

How is the Account Settings button wired up?

The outline button labeled Account Settings 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.

Which edge does this sheet use?

The right: SheetContent leaves side unset. The footer sits at the bottom of the panel because SheetFooter takes the free space above it with mt-auto.

Can I show the password while it is typed?

Not in this demo: both password inputs use type="password" and there is no reveal toggle. Add one with an Input Group and a button that switches the type to text.