• Docs
  • Components
  • Blocks
  • Admin
CtrlK
Get Started
  • Introduction
  • Setup
  • CLI
  • VS Code Extension
  • Figma Code Connect
  • MCP Server
  • llms.txt
  • Changelog
Foundations
  • Design Tokens
  • Theming & Modes
  • Semantic Colors
  • Spacing
  • Typography
Testing
  • Test Guide
  • Performance Tests
  • Visual Regression
Components
  • Accordion
  • Activity Feed
  • Alert
  • Avatar
  • Badge
  • Breadcrumbs
  • Button
  • Card
  • Carousel
  • Checkbox
  • Collapsible
  • Combobox
  • Command Palette
  • Context Menu
  • Date Picker
  • Dialog
  • Dropdown Menu
  • File Upload
  • Hover Card
  • Input
  • Kbd
  • Label
  • Menubar
  • Metric Card
  • Multi Select
  • Navigation Menu
  • Pagination
  • Popover
  • Progress
  • Quick Actions
  • Radio
  • Rating
  • Resizable
  • Segmented Control
  • Select
  • Separator
  • Sheet
  • Skeleton
  • Slider
  • Spinner
  • Split Button
  • Stepper
  • Switch
  • Table
  • Tabs
  • Tag Input
  • Textarea
  • Timeline
  • Toast
  • Toggle
  • Toggle Group
  • Tooltip
  • Tree View
Blocks
  • Activity Feed
  • App Shell
  • Authentication Block
  • Benefits Section
  • Cta Section
  • Data Table
  • Empty State
  • Faq Section
  • Feature Grid Section
  • Footer Section
  • Hero Section
  • Kpi Dashboard
  • Kpi Strip
  • Link Card
  • Metric Card
  • Navigation Header
  • Pagination Footer
  • Pricing Table
  • Quick Actions
  • Settings Screen
Resources
  • API Reference
Command PaletteDate Picker
Command PaletteDate Picker
Command PaletteDate Picker

Context Menu

Show actions based on right-click context.

Example

Default

Right click here

With Submenu

Right click here
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68

Install

The Context Menu is built using Radix UI primitives.

API Reference

ComponentPropsDescription
ContextMenumodal?, onOpenChange?Root component. Must contain ContextMenuTrigger and ContextMenuContent
ContextMenuTriggerasChild?, className?Trigger element that opens the menu on right-click
ContextMenuContentalign?, side?, className?Container for menu items
ContextMenuIteminset?, disabled?, className?Standard menu item
ContextMenuCheckboxItemchecked, onCheckedChange, className?Menu item with checkbox state
ContextMenuRadioItemvalue, className?Menu item with radio state (use within ContextMenuRadioGroup)
ContextMenuLabelinset?, className?Section label for grouping items
ContextMenuSeparatorclassName?Visual separator between menu sections
ContextMenuShortcutclassName?Keyboard shortcut display (e.g., "⌘P")
ContextMenuSub—Container for submenu (use with ContextMenuSubTrigger and ContextMenuSubContent)
ContextMenuSubTriggerinset?, className?Trigger for submenu