shadcn.io is not affiliated with official shadcn/ui
Drawer examples · Right
Right Drawer Settings Panel for React
A right drawer of settings switches, grouped under Notifications and Privacy, with Save Changes and Cancel.
Settings in a right drawer: Switches for email, push and SMS notifications, then for profile visibility and activity, in two FieldSets. Save Changes and Cancel stay at the bottom while the switches scroll.
Preview
Installation
FAQ
How are the settings grouped?
Two FieldSets with a FieldLegend each: Notifications, with Email, Push and SMS, and Privacy, with Profile visible and Show activity.
Which switches start on?
Push notifications, Profile visible and Show activity. Email and SMS notifications start off.
How is each switch labeled?
Each row is a horizontal Field: the FieldLabel at the start names the Switch at the end, and clicking the label flips it.
Does Save Changes store the settings?
Not yet: the switches are uncontrolled and Save Changes has no handler. Control the switches, save on press, and close the drawer once it's stored:
Pass open to Drawer; onOpenChange receives the next boolean.
Related
- Simple Right DrawerA drawer that slides in from the right
- Right Drawer Filter PanelA right drawer of product filters
- Left Drawer with Nested ItemsA left drawer menu whose Products and
- Context Menu with CheckboxesA context menu of view options that
- Right Drawer NotificationsA right drawer listing notifications
- Right Drawer Shopping CartA right drawer shopping cart with three