Core Components
Number Effects
Interactive Elements
Advanced Effects
Radix UI Components
- Accordion
- Alert
- Alert Dialog
- Aspect Ratio
- Avatar
- Badge
- Breadcrumb
- Button
- Button Group
- Calendar
- Card
- Carousel
- Chart
- Checkbox
- Collapsible
- Combobox
- Command
- Context Menu
- Data Table
- Date Picker
- Dialog
- Direction
- Drawer
- Dropdown Menu
- Empty
- Field
- Hover Card
- Input
- Input Group
- Input OTP
- Item
- Kbd
- Label
- Menubar
- Native Select
- Navigation Menu
- Pagination
- Popover
- Progress
- Radio Group
- Resizable
- Scroll Area
- Select
- Separator
- Sheet
- Sidebar
- Skeleton
- Slider
- Sonner
- Spinner
- Switch
- Table
- Tabs
- Textarea
- Toast
- Toggle
- Toggle Group
- Tooltip
- Typography
Base UI Components
- Accordion
- Alert
- Alert Dialog
- Aspect Ratio
- Avatar
- Badge
- Breadcrumb
- Button
- Button Group
- Calendar
- Card
- Carousel
- Chart
- Checkbox
- Collapsible
- Combobox
- Command
- Context Menu
- Data Table
- Date Picker
- Dialog
- Direction
- Drawer
- Dropdown Menu
- Empty
- Field
- Hover Card
- Input
- Input Group
- Input OTP
- Item
- Kbd
- Label
- Menubar
- Native Select
- Navigation Menu
- Pagination
- Popover
- Progress
- Radio Group
- Resizable
- Scroll Area
- Select
- Separator
- Sheet
- Sidebar
- Skeleton
- Slider
- Sonner
- Spinner
- Switch
- Table
- Tabs
- Textarea
- Toast
- Toggle
- Toggle Group
- Tooltip
- Typography
Right click hereLong press here
import {
ContextMenu,
ContextMenuCheckboxItem,Installation#
pnpm dlx shadcn@latest add context-menu
Usage#
import {
ContextMenu,
ContextMenuContent,
ContextMenuItem,
ContextMenuTrigger,
} from "@/components/ui/context-menu"<ContextMenu>
<ContextMenuTrigger>Right click here</ContextMenuTrigger>
<ContextMenuContent>
<ContextMenuItem>Profile</ContextMenuItem>
<ContextMenuItem>Billing</ContextMenuItem>
<ContextMenuItem>Team</ContextMenuItem>
<ContextMenuItem>Subscription</ContextMenuItem>
</ContextMenuContent>
</ContextMenu>Composition#
Use the following composition to build a ContextMenu:
ContextMenu
├── ContextMenuTrigger
└── ContextMenuContent
├── ContextMenuGroup
│ ├── ContextMenuLabel
│ ├── ContextMenuItem
│ └── ContextMenuItem
├── ContextMenuSeparator
├── ContextMenuGroup
│ ├── ContextMenuLabel
│ ├── ContextMenuCheckboxItem
│ └── ContextMenuCheckboxItem
├── ContextMenuSeparator
├── ContextMenuGroup
│ ├── ContextMenuLabel
│ └── ContextMenuRadioGroup
│ ├── ContextMenuRadioItem
│ └── ContextMenuRadioItem
└── ContextMenuSub
├── ContextMenuSubTrigger
└── ContextMenuSubContent
└── ContextMenuGroup
├── ContextMenuItem
└── ContextMenuItemExamples#
Basic#
A simple context menu with a few actions.
Right click hereLong press here
import {
ContextMenu,
ContextMenuContent,Submenu#
Use ContextMenuSub to nest secondary actions.
Right click hereLong press here
import {
ContextMenu,
ContextMenuContent,Shortcuts#
Add ContextMenuShortcut to show keyboard hints.
Right click hereLong press here
import {
ContextMenu,
ContextMenuContent,Groups#
Group related actions and separate them with dividers.
Right click hereLong press here
import {
ContextMenu,
ContextMenuContent,Icons#
Combine icons with labels for quick scanning.
Right click hereLong press here
import {
ClipboardPasteIcon,
CopyIcon,Checkboxes#
Use ContextMenuCheckboxItem for toggles.
Right click hereLong press here
import {
ContextMenu,
ContextMenuCheckboxItem,Radio#
Use ContextMenuRadioItem for exclusive choices.
Right click hereLong press here
"use client"
import * as React from "react"Destructive#
Use variant="destructive" to style the menu item as destructive.
Right click hereLong press here
import { PencilIcon, ShareIcon, TrashIcon } from "lucide-react"
import {RTL#
To enable RTL support in DWL Components, see the RTL configuration guide.
انقر بزر الماوس الأيمن هنااضغط مطولاً هنا
"use client"
import * as React from "react"API Reference#
See the Radix UI documentation for more information.
Build with DWL Components
Use the copied registry, charts, blocks, and create tools in one place.
Start from the DWL Components create flow and customize from there.
Open DWL Components Create