Add custom contextMenu
to you application the simplest way.
Online DEMO
Refer to the Documentations
- 🪆 Support Deeply nested sub menu
- 💪 Fully written in TypeScript
- 🎄 Fully tree-shakable
- 📦 Fully customizable
- 🖇 SSR ready
- ✨ Animation support
- 🎨 Opted-in UI component
- 🔨 Multi-framework support
-
Core
- Basic top-level menu using the custom element
- Deeply nested menu
- Declarative API
- UI preset(yet in beta)
- Online preview editor
- Animation
-
Vue (both Vue2 & Vue3, empowered by Vue Demi)
-
v-directive
usage -
useContextMenu
hook -
<ContextMenu />
component -
<MenuGroup />
and<MenuItem />
component for creating nested menu
-
-
React
-
useContextMenu
hook -
<ContextMenu />
component -
<MenuGroup />
and<MenuItem />
component
-
-
Angular(pending)
-
Vanilla JavaScript
- Native
Web Component
- JavaScript API
- Native
-
Docs
- Vitepress
- Repl Playground
-
IIFE
format forscript
tag
# native JavaScript
npm i @contextmenu/core
# vue
npm i @contextmenu/vue @contextmenu/core
# react
npm i @contextmenu/react @contextmenu/core
Use the ContextMenu
component to create a context menu.
- Vue setup
<script setup lang="ts">
import { ContextMenu } from '@contextmenu/vue'
</script>
<template>
<ContextMenu>
Place your context menu here.
</ContextMenu>
</template>
- React
import { ContextMenu } from '@contextmenu/react'
function App() {
return (
<ContextMenu>
Place your context menu here.
</ContextMenu>
)
}
Please refer to the documentation for more details.
package name | version |
---|---|
@contextmenu/core | |
@contextmenu/vue | |
@contextmenu/react | |
@contextmenu/shared |