Context Menu

Right-click menu on bits-ui ContextMenu. Opens at the pointer with a zoom-fade from the anchored corner, navigable with arrow keys, dismisses on Esc or outside click.

Usage

Right-click here

Inverted

Set variant="inverted" on the content for Bloom’s signature dark-on-light menu surface. Item rows, separators, and focus rings inherit the inverted contrast through CSS-var swaps.

Right-click for inverted menu

With icon

Drop a Remix icon (the <Icon> primitive) as the first child of ContextMenu.Item; the item's flex layout handles spacing.

Right-click for icon menu

With shortcut

ContextMenu.Shortcut right-aligns inside the row — pair with a leading icon for the canonical platform-menu shape.

Right-click for shortcut menu

With checkbox

ContextMenu.CheckboxItem binds to a boolean and toggles in place.

Right-click for toggles

With radio

Wrap ContextMenu.RadioItem in a ContextMenu.RadioGroup with a bound value.

Right-click to pick a theme

ContextMenu.Sub nests another content surface that opens to the side.

Right-click for nested menu

ContextMenu.Root props

Inherits bits-ui ContextMenu.Root props via spread.

PropTypeDescription
boolean (bindable)Controls visibility. Two-way bindable.
(open: boolean) => voidFires when the menu opens or closes.
'ltr' | 'rtl'Reading direction — affects submenu side.

ContextMenu.Content props

PropTypeDescription
'default' | 'inverted'Surface treatment. Inverted swaps popover/accent CSS vars to render dark on light (and light on dark) — Bloom’s signature menu identity.
ComponentProps<ContextMenu.Portal>Forwarded to the internal portal.
stringMerged onto the content surface via tailwind-merge.