Getting Started
Foundations
Components
Search for a command to run...
Context menus provide quick access to contextual actions and commands related to a specific element or area. They appear at the cursor position and offer relevant options based on what was clicked, making them ideal for power users and complex interfaces.
import { ContextMenu } from "@strongtie/design-system/context-menu"This module exports the following components:
ContextMenuContextMenuCheckboxItemContextMenuContentContextMenuGroupContextMenuItemContextMenuLabelContextMenuPortalContextMenuRadioGroupContextMenuRadioItemContextMenuSeparatorContextMenuShortcutContextMenuSubContextMenuSubContentContextMenuSubTriggerContextMenuTrigger<ContextMenuItem>| Prop | Type | Default | Description |
|---|---|---|---|
inset | boolean | - | |
variant | default | destructive | - |
<ContextMenuLabel>| Prop | Type | Default | Description |
|---|---|---|---|
inset | boolean | - |
<ContextMenuSubTrigger>| Prop | Type | Default | Description |
|---|---|---|---|
inset | boolean | - |
Components can be styled using the className prop. The design system uses Tailwind CSS for styling.
CSS classes used by this component:
context-menu-checkbox-itemcontext-menu-contentcontext-menu-itemcontext-menu-labelcontext-menu-radio-itemcontext-menu-separatorcontext-menu-shortcutcontext-menu-sub-contentcontext-menu-sub-triggerEnsure proper accessibility attributes are added when implementing this component.