Measured entry

shadcn-context-menu

dropdownunclassified

A copy-in React context menu built on Radix UI primitives. It ships as a client-side TypeScript source component with items, groups, checkboxes, radio choices, submenus, separators, labels, and shortcuts. Its presentation relies on lucide-react icons, a cn helper, Tailwind utilities, theme tokens, and animation classes.

Specimen
Harness screenshot of shadcn-context-menu at 375 pixels wide
Harness screenshot at 375 pixels wide. This viewport scrolled sideways.
Harness screenshot of shadcn-context-menu at 768 pixels wide
Harness screenshot at 768 pixels wide. No horizontal overflow recorded.
Harness screenshot of shadcn-context-menu at 1440 pixels wide
Harness screenshot at 1440 pixels wide. No horizontal overflow recorded.

Measured

Every value below was written by the harness on the run that produced the frames above. None of it is derived from the prose.

Harness measurements recorded for shadcn-context-menu
BuildOK
MountOK
Console errors0
Uncaught page errors0
Horizontal overflowflagged at 375
Axe critical0
Axe serious0
Axe moderate0
Axe minor0
Gzip marginal58.7 KB (124.1 KB build, 65.4 KB baseline)
Bare modeFAIL
Provider requiredNO
Demo usedwritten from the component source API

What the harness recorded

BARE BUILD

✗ Build failed in 27.53s
error during build:
[vite:load-fallback] Could not load <sandbox>/src/lib/utils (imported by src/cut/components/ui/context-menu.tsx): ENOENT: no such file or directory, open '<sandbox>/src/lib/utils'

Verdict

A capable, accessible foundation for desktop context actions, with useful variants and submenu support. It mounts cleanly in the prepared harness, but the bare build fails on the missing cn utility import, so it needs a shadcn-style setup before it can be dropped into another project. Review narrow layouts before adopting it.

Use it if

  • You need a desktop right-click menu with keyboard navigation and focus handling supplied by Radix UI.
  • Your product needs nested actions, checked options, radio selections, or destructive menu items in one consistent API.
  • Your app already follows shadcn conventions and you want source code that can be edited locally.

Skip it if

  • Your interface is primarily touch-driven and cannot provide an obvious alternate way to reach the same actions.
  • You need a dependency-light menu and do not want Radix UI or the supporting icon and styling setup.
  • Your narrow layout cannot tolerate the horizontal overflow observed in the compact viewport.
  • You want a packaged component with isolated styles instead of source tied to app-level Tailwind tokens.

Install

Installation record for shadcn-context-menu
Declared dependenciesradix-ui
Missing on installnone
Bare installfails once the shadcn-style helpers are removed, so it needs that setup
Providerno provider required in the harness

For a non-shadcn project, add Radix UI and lucide-react, provide a compatible cn class-merging helper, replace or configure the alias import, and supply the Tailwind theme tokens and animation utilities used by the component. Keep it in a client-rendered boundary where the framework requires one.

Source and credit

This page is a review, not a copy. The component source lives with its author and this site does not republish it. Read the license before you use anything.

Author repository

github.com/shadcn-ui/ui
License
MIT
Record published
2026-08-14

Alternatives

Other published entries for the dropdown pattern, ordered by what they measured: mounts first, then clean axe scans, then bare-mode passes, then the smaller bundle.