Holiday sale: 40% off Pro with code · limited offer · ends Dec 31
See ProA frosted glass context menu that springs out of the pointer, scaling up from the exact corner you clicked while it sharpens from a blur. Right click, long press on touch or the menu key opens it; the pressed item is lifted above a dimmed, blurred backdrop as a live preview. Supports nested submenus that fly out sideways, a sliding highlight, shortcuts, color tags, destructive items, typeahead and full arrow key navigation with focus returned on close, all with viewport aware placement.
Included in Pro and aboveCompare plans
Live preview. Move the mouse, scroll and click inside the frame.
The copied code, markdown and prompt include the values you set here.
import { ContextMenuGlass } from "@/components/hyperblur-pro/context-menu-glass"
<ContextMenuGlass />
<GlassContextMenu
items={[
{ label: "Open", shortcut: "Enter", onSelect: open },
{ label: "Share", items: [{ label: "Copy link", onSelect: copy }] },
{ separator: true },
{ label: "Delete", danger: true, onSelect: remove },
]}
>
<div data-menu-target tabIndex={0}>Right click me</div>
</GlassContextMenu>| Prop | Type | Default | Description |
|---|---|---|---|
| items | GlassMenuItem[] | (target) => GlassMenuItem[] | required | GlassContextMenu: rows with label, icon, shortcut, swatch, danger, disabled, separator, nested items and onSelect. The function form receives the element marked with data-menu-target that was pressed. |
| appearance | "light" | "dark" | "auto" | "light" | Menu glass tint and text color. |
| preview | boolean | true | Lift a copy of the pressed data-menu-target element above the backdrop. |
| dim | boolean | true | Dim and blur the page behind the open menu. |
| longPressMs | number | 450 | GlassContextMenu: hold time that opens the menu on touch and pen. |
| onSelect / onOpenChange | function | undefined | GlassContextMenu: called with the chosen item and target, and when the menu opens or closes. |
| autoOpen | number | 900 | ContextMenuGlass: opens the menu once on the second photo this many ms after the gallery scrolls into view, as a demo. 0 disables it. |
| image | string | "https://images.unsplash.com/photo-1506905925346-21bda4d32df4" | ContextMenuGlass: backdrop photo. |
| photos | string[] | 8 Unsplash landscapes | ContextMenuGlass: gallery images that carry the menu. |
| title / subtitle | string | "Field notes" | ContextMenuGlass: window heading and helper line. |
Source code is included in Pro and above