Skip to content
THE COMPONENT LIBRARY
Skip to content

Component reference

ContextMenu

Contextual commands for a project row.

Preview

Live preview

Changes apply to this preview only.

Project Atlas

Right-click the project or focus it and press Shift F10. The visible actions below provide an alternative.

No command selected.

Width adapts to the available space

More examples

Different configurations and compositions using the real Pimolu API. Each preview runs independently and follows the site appearance.

Document commands

Right-click or press Shift+F10 on the focusable document; selection is reported.

Open preview

Right-click area

Right-click anywhere inside the surface. The native menu is suppressed.

Open preview

Examples

A row or card can own its context menu without changing the surrounding layout.

Open preview

Usage

Offer the same actions through a visible alternative because right click is not universally discoverable.

API reference

Generated from the public TypeScript declarations. Native HTML attributes are inherited where the component extends them; this reference includes Pimolu props and selected common native attributes.

PimoluContextMenuProps

Type source
PimoluContextMenuProps public API
NameTypeDefaultDescription
childrenRequiredReactNode—Public Pimolu prop; see the source declaration for details.
openboolean | undefined—Controlled open state. Omit to let the component own it.
defaultOpenboolean | undefinedfalseInitial open state when uncontrolled. Defaults to false.
onOpenChange((open: boolean) => void) | undefined—Called whenever the component asks to open or close.
childrenRequired

ReactNode

No default extracted.

Public Pimolu prop; see the source declaration for details.

open

boolean | undefined

No default extracted.

Controlled open state. Omit to let the component own it.

defaultOpen

boolean | undefined

Default: false

Initial open state when uncontrolled. Defaults to false.

onOpenChange

((open: boolean) => void) | undefined

No default extracted.

Called whenever the component asks to open or close.

PimoluContextMenuTriggerProps

Type source
PimoluContextMenuTriggerProps public API
NameTypeDefaultDescription
childrenRequiredReactElement<unknown, string | JSXElementConstructor<any>>—The single element that opens the menu. It gets the contextmenu handler and the ref, and the handlers it already had keep working.
childrenRequired

ReactElement<unknown, string | JSXElementConstructor<any>>

No default extracted.

The single element that opens the menu. It gets the contextmenu handler and the ref, and the handlers it already had keep working.

PimoluContextMenuContentProps

Type source
PimoluContextMenuContentProps public API
NameTypeDefaultDescription
childrenRequiredReactNode—Public Pimolu prop; see the source declaration for details.
collisionPaddingnumber | undefined8Minimum distance kept from the viewport edges, in pixels. Defaults to 8.
classNamestring | undefined—Class applied to the menu panel.
childrenRequired

ReactNode

No default extracted.

Public Pimolu prop; see the source declaration for details.

collisionPadding

number | undefined

Default: 8

Minimum distance kept from the viewport edges, in pixels. Defaults to 8.

className

string | undefined

No default extracted.

Class applied to the menu panel.

PimoluContextMenuItemProps

Type source
PimoluContextMenuItemProps public API
NameTypeDefaultDescription
childrenRequiredReactNode—Public Pimolu prop; see the source declaration for details.
onSelect(() => void) | undefined—Called before the menu closes and focus returns to the trigger.
disabledboolean | undefinedfalsePublic Pimolu prop; see the source declaration for details.
childrenRequired

ReactNode

No default extracted.

Public Pimolu prop; see the source declaration for details.

onSelect

(() => void) | undefined

No default extracted.

Called before the menu closes and focus returns to the trigger.

disabled

boolean | undefined

Default: false

Public Pimolu prop; see the source declaration for details.

PimoluContextMenuSeparatorProps

Type source
PimoluContextMenuSeparatorProps public API
NameTypeDefaultDescription
classNamestring | undefined—Public Pimolu prop; see the source declaration for details.
className

string | undefined

No default extracted.

Public Pimolu prop; see the source declaration for details.

PimoluContextMenuLabelProps

Type source
PimoluContextMenuLabelProps public API
NameTypeDefaultDescription
childrenRequiredReactNode—Public Pimolu prop; see the source declaration for details.
classNamestring | undefined—Public Pimolu prop; see the source declaration for details.
childrenRequired

ReactNode

No default extracted.

Public Pimolu prop; see the source declaration for details.

className

string | undefined

No default extracted.

Public Pimolu prop; see the source declaration for details.

Accessibility

  • Verify the keyboard context-menu path, menu navigation, dismissal and focus return.
Read the accessibility guide →