Context Menu

Pops a menu right where you click or hold down long, perfect for a right-click or a solid long press. It's all about quick access and easy picks!

Basic

This component excels in desktop applications but has significant limitations. Its lack of accessibility and mobile compatibility are notable drawbacks. React Aria hasn't released an official version of this component yet, possibly due to these issues.

Unless it's absolutely necessary for your project, I'd advise against using it. For most scenarios requiring accessible, rich interfaces, consider alternatives like Menus or Popovers instead. These components typically offer better cross-platform support and accessibility features.

The initial release will be an alpha version due to ongoing issues with cursor positioning accuracy. If you're able to contribute, I'd appreciate your help in submitting a pull request to address this component's limitations.

Installation

If you hit any issues, make sure you check out the installation guide here.

Composed Components

When you plug this component from the CLI, it autoloads all the composed components. No need to toss 'em in one at a time.

The Context Menu's decked out with several components to make it bangin'.

Menu

A sleek, interactive component that reveals options on click, perfect for seamless navigation and organizing choices in a compact space.

Manual Installation

Sometimes, using the CLI is the way to go, so make sure you install the necessary dependencies for the components you want to use.

And next, you can copy the code below and paste it into your dopest component folder.

Item Details

You can add details to menu items by using the ContextMenuItemDetails component.

Danger

Designate a menu item as dangerous.

With Icon

Enhance context menu item by adding icons.

Separator

Separate context menu items with a separator.

Context Sub Menu

Sorry, this component doesn't exist yet. It's on our roadmap.

Disabled

Disable specific menu items.

Also, you can disable items directly in MenuContent by using the disabledKeys prop.

<ContextMenu.Content disabledKeys={['gsu']} />