Gathering detailed insights and metrics for @danyaagay/mantine-contextmenu
Gathering detailed insights and metrics for @danyaagay/mantine-contextmenu
Gathering detailed insights and metrics for @danyaagay/mantine-contextmenu
Gathering detailed insights and metrics for @danyaagay/mantine-contextmenu
Craft your applications for productivity and meet your users’ expectations by enhancing your Mantine-based UIs with a desktop-grade, lightweight yet fully-featured, dark-theme aware context-menu component, built by the creator of Mantine DataTable.
npm install @danyaagay/mantine-contextmenu
Typescript
Module System
Node Version
NPM Version
61.7
Supply Chain
91.3
Quality
75.9
Maintenance
100
Vulnerability
99.6
License
TypeScript (89.87%)
CSS (9.1%)
JavaScript (1%)
HTML (0.03%)
Total Downloads
210
Last Day
1
Last Week
6
Last Month
12
Last Year
210
MIT License
151 Stars
545 Commits
8 Forks
4 Watchers
3 Branches
3 Contributors
Updated on May 18, 2025
Minified
Minified + Gzipped
Latest Version
7.9.1
Package Id
@danyaagay/mantine-contextmenu@7.9.1
Unpacked Size
68.44 kB
Size
17.13 kB
File Count
10
NPM Version
10.5.2
Node Version
20.13.1
Published on
May 29, 2024
Cumulative downloads
Total Downloads
Last Day
0%
1
Compared to previous day
Last Week
100%
6
Compared to previous week
Last Month
71.4%
12
Compared to previous month
Last Year
0%
210
Compared to previous year
4
32
Craft your applications for productivity and meet your users’ expectations by enhancing your Mantine-based UIs with a desktop-grade, lightweight yet fully-featured, dark-theme aware context-menu component, built by the creator of Mantine DataTable.
⚠️ NOTE: Mantine ContextMenu V7 is compatible with Mantine V7.
💡 If you're looking for the old version that works with Mantine V6, head over to Mantine ContextMenu V6.
ContextMenuProvider
component and use the hook-generated function in your codeclassName
/classNames
and style
/styles
props to customize the context menu appearanceVisit icflorescu.github.io/mantine-contextmenu to view the full documentation and learn how to use it by browsing the list of usage examples.
Create a new Mantine application, make sure to have the clsx
peer dependency installed,
then install the package with npm i mantine-contextmenu
or yarn add mantine-contextmenu
.
Import the necessary CSS files:
1import '@mantine/core/styles.layer.css'; 2import 'mantine-contextmenu/styles.layer.css'; 3import './layout.css';
Make sure to apply the styles in the correct order:
1/* layout.css */ 2/* 👇 Apply Mantine core styles first, ContextMenu styles second */ 3@layer mantine, mantine-contextmenu;
Wrap your application in a ContextMenuProvider
inside the MantineProvider
:
1import { MantineProvider } from '@mantine/core'; 2import { ContextMenuProvider } from 'mantine-contextmenu'; 3 4function App() { 5 return ( 6 <MantineProvider> 7 <ContextMenuProvider>{/* your app code here... */}</ContextMenuProvider> 8 </MantineProvider> 9 ); 10}
Use the showContextMenu
function generated by the useContextMenu
in your code:
1'use client'; 2// 👆 Since 'useContextMenu' is a hook, don't forget to add the 'use client' directive 3// at the top of your file if you're using it in a RSC context 4 5import { IconCopy, IconDownload } from '@tabler/icons-react'; 6import { useContextMenu } from 'mantine-contextmenu'; 7import Picture from '~/components/Picture'; 8import { copyImageToClipboard, downloadImage, unsplashImages } from '~/lib/image'; 9 10export default function GettingStartedExample() { 11 const { showContextMenu } = useContextMenu(); 12 13 const image = unsplashImages[0]; 14 const { src } = image.file; 15 16 return ( 17 <Picture 18 image={image} 19 onContextMenu={showContextMenu([ 20 { 21 key: 'copy', 22 icon: <IconCopy size={16} />, 23 title: 'Copy to clipboard', 24 onClick: () => copyImageToClipboard(src), 25 }, 26 { 27 key: 'download', 28 icon: <IconDownload size={16} />, 29 title: 'Download to your computer', 30 onClick: () => downloadImage(src), 31 }, 32 ])} 33 /> 34 ); 35}
Make sure to browse the list of usage examples to learn how to unleash the full power of Mantine ContextMenu.
💡 Mantine DataTable - The lightweight, dependency-free, dark-theme aware table component for your Mantine UI data-rich applications, featuring asynchronous data loading support, pagination, intuitive Gmail-style additive batch rows selection, column sorting, custom cell data rendering, row expansion, nesting, context menus, and much more. Built by the creator of Mantine ContextMenu.
See the contributing guide in the documentation website or the repo CONTRIBUTING.md file for details.
Here's the list of people who have already contributed to Mantine ContextMenu:
Want to become a code contributor?
If you find this package useful, please consider ❤️ sponsoring my work.
Your sponsorship will help me dedicate more time to maintaining the project and will encourage me to add new features and fix existing bugs.
If you're a company using Mantine, Mantine ContextMenu or Mantine DataTable in a commercial project, you can also hire my services.
If you can't afford to sponsor the project or hire my services, there are other ways you can support my work:
The more stars this repository gets, the more visibility it gains among the Mantine users community. The more users it gets, the more chances that some of those users will become active code contributors willing to put their effort into bringing new features to life and/or fixing bugs.
As the repository gain awareness, my chances of getting hired to work on Mantine-based projects will increase, which in turn will help maintain my vested interest in keeping the project alive.
If you want to hire my services, don't hesitate to drop me a line at the email address listed in my GitHub profile.
I'm currently getting a constant flow of approaches, some of them relevant, others not so relevant.
Mentioning “Mantine ContextMenu” in your text would help me prioritize your message.
The MIT License.
No vulnerabilities found.
No security vulnerabilities found.