Home / Function/ DropdownMenuWithCheckboxesIcons() — ui Function Reference

DropdownMenuWithCheckboxesIcons() — ui Function Reference

Architecture documentation for the DropdownMenuWithCheckboxesIcons() function in dropdown-menu-example.tsx from the ui codebase.

Entity Profile

Dependency Diagram

graph TD
  dce61c0e_88a7_4934_bf07_73a1fc8f0848["DropdownMenuWithCheckboxesIcons()"]
  27bfb7fb_c5ea_fc51_35b4_305b0a010c9a["dropdown-menu-example.tsx"]
  dce61c0e_88a7_4934_bf07_73a1fc8f0848 -->|defined in| 27bfb7fb_c5ea_fc51_35b4_305b0a010c9a
  style dce61c0e_88a7_4934_bf07_73a1fc8f0848 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

apps/v4/registry/bases/radix/examples/dropdown-menu-example.tsx lines 350–418

function DropdownMenuWithCheckboxesIcons() {
  const [notifications, setNotifications] = React.useState({
    email: true,
    sms: false,
    push: true,
  })

  return (
    <Example title="Checkboxes with Icons">
      <DropdownMenu>
        <DropdownMenuTrigger asChild>
          <Button variant="outline" className="w-fit">
            Notifications
          </Button>
        </DropdownMenuTrigger>
        <DropdownMenuContent className="min-w-56">
          <DropdownMenuGroup>
            <DropdownMenuLabel>Notification Preferences</DropdownMenuLabel>
            <DropdownMenuCheckboxItem
              checked={notifications.email}
              onCheckedChange={(checked) =>
                setNotifications({ ...notifications, email: checked === true })
              }
            >
              <IconPlaceholder
                lucide="MailIcon"
                tabler="IconMail"
                hugeicons="MailIcon"
                phosphor="EnvelopeIcon"
                remixicon="RiMailLine"
              />
              Email notifications
            </DropdownMenuCheckboxItem>
            <DropdownMenuCheckboxItem
              checked={notifications.sms}
              onCheckedChange={(checked) =>
                setNotifications({ ...notifications, sms: checked === true })
              }
            >
              <IconPlaceholder
                lucide="MessageSquareIcon"
                tabler="IconMessage"
                hugeicons="MessageIcon"
                phosphor="ChatCircleIcon"
                remixicon="RiChat1Line"
              />
              SMS notifications
            </DropdownMenuCheckboxItem>
            <DropdownMenuCheckboxItem
              checked={notifications.push}
              onCheckedChange={(checked) =>
                setNotifications({ ...notifications, push: checked === true })
              }
            >
              <IconPlaceholder
                lucide="BellIcon"
                tabler="IconBell"
                hugeicons="NotificationIcon"
                phosphor="BellIcon"
                remixicon="RiNotificationLine"
              />
              Push notifications
            </DropdownMenuCheckboxItem>
          </DropdownMenuGroup>
        </DropdownMenuContent>
      </DropdownMenu>
    </Example>
  )
}

Subdomains

Frequently Asked Questions

What does DropdownMenuWithCheckboxesIcons() do?
DropdownMenuWithCheckboxesIcons() is a function in the ui codebase, defined in apps/v4/registry/bases/radix/examples/dropdown-menu-example.tsx.
Where is DropdownMenuWithCheckboxesIcons() defined?
DropdownMenuWithCheckboxesIcons() is defined in apps/v4/registry/bases/radix/examples/dropdown-menu-example.tsx at line 350.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free