Switch theme

Examples › Action titles

If you’re not happy with the titles that are generated automatically based on the action keys, you can provide your own, like so:
const showContextMenu = useContextMenu();
// ...
return (
<Picture
image={image}
onContextMenu={showContextMenu([
{
key: 'copy',
title: 'Copy image to clipboard',
onClick: () => copyImageToClipboard(src),
},
{
key: 'download',
title: 'Download image to your computer',
onClick: () => downloadImage(src),
},
])}
/>
);
Right-click on the image to trigger the context menu:
Picture by Zeke Tucker | Mantine ContextMenu
Picture by Zeke Tucker
MIT LicenseSponsor the author
Built by Ionut-Cristian Florescu, the author of Mantine DataTable.
Please sponsor my work if you find it useful.
GitHub StarsNPM Downloads