"use client" import * as React from "react" import { Example, ExampleWrapper, } from "@/registry/bases/base/components/example" import { Button } from "@/registry/bases/base/ui/button" import { ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, } from "@/registry/bases/base/ui/context-menu" import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle, DialogTrigger, } from "@/registry/bases/base/ui/dialog" import { IconPlaceholder } from "@/app/(create)/components/icon-placeholder" export default function ContextMenuExample() { return ( ) } function ContextMenuBasic() { return ( Right click here Back Forward Reload ) } function ContextMenuWithIcons() { return ( Right click here Copy Cut Paste Delete ) } function ContextMenuWithShortcuts() { return ( Right click here Back ⌘[ Forward ⌘] Reload ⌘R Save ⌘S Save As... ⇧⌘S ) } function ContextMenuWithSubmenu() { return ( Right click here Copy ⌘C Cut ⌘X More Tools Save Page... Create Shortcut... Name Window... Developer Tools Delete ) } function ContextMenuWithGroups() { return ( Right click here File New File ⌘N Open File ⌘O Save ⌘S Edit Undo ⌘Z Redo ⇧⌘Z Cut ⌘X Copy ⌘C Paste ⌘V Delete ) } function ContextMenuWithCheckboxes() { return ( Right click here Show Bookmarks Bar Show Full URLs Show Developer Tools ) } function ContextMenuWithRadio() { const [user, setUser] = React.useState("pedro") const [theme, setTheme] = React.useState("light") return ( Right click here People Pedro Duarte Colm Tuite Theme Light Dark System ) } function ContextMenuWithDestructive() { return ( Right click here Edit Share Archive Delete ) } function ContextMenuWithSides() { return (
{( [ "inline-start", "left", "top", "bottom", "right", "inline-end", ] as const ).map((side) => ( {side.replace("-", " ")} Back Forward Reload ))}
) } function ContextMenuInDialog() { return ( }> Open Dialog Context Menu Example Right click on the area below to see the context menu. Right click here Copy Cut Paste More Options Save Page... Create Shortcut... Name Window... Developer Tools Delete ) }