shadcn.io is an independent project built on shadcn/ui
Notifications opens two checkbox groups: email, push, and SMS, then comments, mentions, and product updates. Any mix can stay on.
Use it when those toggles are flipped often enough to live in the header. Rare settings belong on the page as a Switch. In React, Base UI does not save the checks or send a notification.
Installation
Anatomy

Usage
<DropdownMenu>
<DropdownMenuTrigger render={<Button variant="outline" />}>
<BellIcon aria-hidden="true" data-icon="inline-start" />
Notifications
</DropdownMenuTrigger>
<DropdownMenuContent className="w-56">
<DropdownMenuGroup>
<DropdownMenuLabel>Notification Channels</DropdownMenuLabel>
<DropdownMenuSeparator />
<DropdownMenuCheckboxItem
checked={emailNotifications}
onCheckedChange={setEmailNotifications}
>
Email Notifications
</DropdownMenuCheckboxItem>
<DropdownMenuCheckboxItem
checked={pushNotifications}
onCheckedChange={setPushNotifications}
>
Push Notifications
</DropdownMenuCheckboxItem>
<DropdownMenuCheckboxItem
checked={smsNotifications}
onCheckedChange={setSmsNotifications}
>
SMS Notifications
</DropdownMenuCheckboxItem>
</DropdownMenuGroup>
<DropdownMenuSeparator />
<DropdownMenuGroup>
<DropdownMenuLabel>Notify Me About</DropdownMenuLabel>
{/* The rest of the file is under Installation. */}FAQ
Which notification rows start on?
Email Notifications, Push Notifications, Comments and Mentions start checked; SMS Notifications and Product Updates start off.
Each DropdownMenuCheckboxItem takes checked and onCheckedChange, which receives a boolean.
How are the two sections built?
Two DropdownMenuGroups with a separator between them. Each starts with its DropdownMenuLabel, Notification Channels or Notify Me About, and holds three checkbox rows. The menu is w-56.
Can Email and Push both stay on?
Yes. Every row is its own toggle, so any mix of channels and events can be on, including none.
API Reference
Dropdown Menu
Sets checked={emailNotifications}, onCheckedChange={setEmailNotifications}, checked={pushNotifications}, onCheckedChange={setPushNotifications}, checked={smsNotifications} and onCheckedChange={setSmsNotifications}. The rest is on the Dropdown Menu page.
Button
Sets variant="outline". The rest is on the Button page.







