shadcn.io is not affiliated with official shadcn/ui
Sheet examples · Settings
Notification Preferences Sheet for React
A right-side sheet of notification settings, with email and push checkboxes grouped under their own headings.
Notification settings in two groups, Email Notifications and Push Notifications, each a FieldSet whose FieldLegend names its checkboxes. The legend gives screen readers the group as well as the row, so Mentions is heard as a push setting.
Preview
Installation
FAQ
How are the notification options grouped?
Email Notifications holds Product Updates and Newsletter. Push Notifications holds New Messages and Mentions. Each group is a FieldSet with a FieldLegend and a FieldGroup of rows.
How is each checkbox named?
Each row is a horizontal Field: the FieldLabel at the start names the Checkbox at the end, and clicking the label toggles it. Newsletter is the only box that starts unchecked.
Is there a save button?
No. The checkboxes are uncontrolled and the sheet has no footer, so nothing reads them. Add a SheetFooter with a save button, and make the boxes controlled, to store the choices.
Why does this sheet include a SheetTitle?
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 Notification Settings, with Choose what notifications you want to receive as the description.
Related
- App Preferences SheetA right-side sheet of four app
- Theme Settings SheetA right-side appearance sheet with a
- Privacy Settings SheetA right-side sheet of privacy checkboxes
- Sidebar Navigation SheetA left-side navigation sheet with
- User Profile Edit SheetA right-side sheet for editing a username
- Simple CheckboxA checkbox with a label for a single