shadcn.io is an independent project built on shadcn/ui
A right panel titled Settings, with the line Manage your preferences. Switches sit under Notifications and Privacy, and Save Changes and Cancel sit at the bottom.
Use it for a few preferences beside the page on a phone. A long settings form belongs on its own page, not in a Sheet. In React, Ark UI does not save the switches.
Installation
Anatomy

Usage
<Drawer swipeDirection="right">
<DrawerTrigger asChild>
<Button aria-label="Open settings" size="icon-md" variant="outline">
<SettingsIcon aria-hidden="true" />
</Button>
</DrawerTrigger>
<DrawerContent showBar={false}>
<DrawerHeader>
<DrawerTitle>Settings</DrawerTitle>
<DrawerDescription>Manage your preferences</DrawerDescription>
</DrawerHeader>
<div className="flex min-h-0 flex-1 flex-col gap-6 overflow-y-auto p-4">
<FieldSet>
<FieldLegend variant="label">Notifications</FieldLegend>
<FieldGroup className="gap-3">
<Field orientation="horizontal">
<FieldLabel className="font-normal">
Email notifications
</FieldLabel>
<Switch />
</Field>
<Field orientation="horizontal">
<FieldLabel className="font-normal">
Push notifications
</FieldLabel>
<Switch defaultChecked />
</Field>
<Field orientation="horizontal">
<FieldLabel className="font-normal">SMS notifications</FieldLabel>
<Switch />
</Field>
{/* The rest of the file is under 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 and read details.open in onOpenChange.
API Reference
Drawer
Sets swipeDirection="right", asChild and showBar={false}. The rest is on the Drawer page.
Button
Sets aria-label="Open settings", size="icon-md" and variant="outline". The rest is on the Button page.
Field
Sets variant="label" and orientation="horizontal". The rest is on the Field page.
Switch
Sets defaultChecked. The rest is on the Switch page.





