Context menu
A menu that grows out from the pointer on a right click or a long press.
npx shadcn add https://kinoui.com/r/context-menu.jsonCopy install command
Examples
Right-click here, long-press on a touch screen, or focus it and press Shift F10
Default
It grows out from the pointer, and one highlight glides from item to item.
Installation
Copy code
npx shadcn@latest add https://kinoui.com/r/context-menu.json- Files
lib/reduce-motion.tslib/scroll.tscomponents/kino/separator.tsxlib/popup.tslib/resize.tslib/run-progress.tslib/highlight.tslib/menu.tsxcomponents/kino/context-menu.tsx- Packages
@base-ui/reactclass-variance-authority- Global CSS
- the feels, the density tokens, the shape tokens and the success and warning colours
New to Kino? Installation covers what your project needs first and the @kino namespace.
API reference
ContextMenuContent
ContextMenuItem
ContextMenuCheckboxItem
Data attributes
Accessibility
- The menu opens with the context menu key or Shift F10 on a focused trigger, as well as with the pointer.
- Arrow keys move between items, Home and End go to the first and the last, and typing a letter goes to the next item that starts with it.
- Enter or Space picks an item. The arrow that points into a submenu opens it, and the other arrow or Escape closes it.
- Focus goes back to the trigger when the menu closes.
- A checkbox item is announced as checked or not, and a radio item as picked or not. On screen a checked item shows its tick, and a picked radio item its tint and medium label, so neither relies on colour alone.
- When the system asks for less motion, menus only fade and the highlight moves at once.