New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@vaadin/vaadin-context-menu

Package Overview
Dependencies
Maintainers
19
Versions
275
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vaadin/vaadin-context-menu - npm Package Compare versions

Comparing version 22.0.0-beta1 to 22.0.0-beta2

6

package.json
{
"name": "@vaadin/vaadin-context-menu",
"version": "22.0.0-beta1",
"version": "22.0.0-beta2",
"publishConfig": {

@@ -35,5 +35,5 @@ "access": "public"

"dependencies": {
"@vaadin/context-menu": "22.0.0-beta1"
"@vaadin/context-menu": "22.0.0-beta2"
},
"gitHead": "4cf8a9d0504994200c610e44b3676114fef49c1e"
"gitHead": "f13833683e6667f6ca6678452db14aa6b7eac4a4"
}

@@ -1,77 +0,10 @@

# <vaadin-context-menu>
# @vaadin/vaadin-context-menu
[Live Demo ↗](https://vaadin.com/components/vaadin-context-menu/html-examples)
|
[API documentation ↗](https://vaadin.com/components/vaadin-context-menu/html-api)
> ⚠️  Starting from Vaadin 22, this package is deprecated.
> Please use [`@vaadin/context-menu`](https://www.npmjs.com/package/@vaadin/context-menu) instead.
[<vaadin-context-menu>](https://vaadin.com/components/vaadin-context-menu) is a Web Component providing a contextual menu, part of the [Vaadin components](https://vaadin.com/components).
A web component that can be attached to any component to display a context menu.
[![npm version](https://badgen.net/npm/v/@vaadin/vaadin-context-menu)](https://www.npmjs.com/package/@vaadin/vaadin-context-menu)
[![Published on Vaadin Directory](https://img.shields.io/badge/Vaadin%20Directory-published-00b4f0.svg)](https://vaadin.com/directory/component/vaadinvaadin-context-menu)
[![Discord](https://img.shields.io/discord/732335336448852018?label=discord)](https://discord.gg/PHmkCKC)
[Documentation + Live Demo ↗](https://vaadin.com/docs/latest/ds/components/context-menu)
```html
<vaadin-context-menu>
<span>Open a context menu with <b>right click</b> or with <b>long touch.</b></span>
</vaadin-context-menu>
<script>
const contextMenu = document.querySelector('vaadin-context-menu');
contextMenu.renderer = function (root) {
let listBox = root.firstElementChild;
// Check if there is a list-box generated with the previous renderer call to update its content instead of recreation
if (listBox) {
listBox.innerHTML = '';
} else {
listBox = document.createElement('vaadin-list-box');
root.appendChild(listBox);
}
['First', 'Second', 'Third'].forEach(function (name) {
const item = document.createElement('vaadin-item');
item.textContent = name + ' menu item';
listBox.appendChild(item);
});
};
</script>
```
[<img src="https://raw.githubusercontent.com/vaadin/vaadin-context-menu/master/screenshot.png" width="493" alt="Screenshot of vaadin-context-menu">](https://vaadin.com/components/vaadin-context-menu)
**Note:** [`<vaadin-list-box>`](https://github.com/vaadin/vaadin-list-box) component used in the above example should be installed and imported separately.
## Installation
Install `vaadin-context-menu`:
```sh
npm i @vaadin/vaadin-context-menu --save
```
Once installed, import it in your application:
```js
import '@vaadin/vaadin-context-menu/vaadin-context-menu.js';
```
## Getting started
Vaadin components use the Lumo theme by default.
To use the Material theme, import the correspondent file from the `theme/material` folder.
## Entry points
- The component with the Lumo theme:
`theme/lumo/vaadin-context-menu.js`
- The component with the Material theme:
`theme/material/vaadin-context-menu.js`
- Alias for `theme/lumo/vaadin-context-menu.js`:
`vaadin-context-menu.js`
## Contributing

@@ -85,2 +18,3 @@

Vaadin collects development time usage statistics to improve this product. For details and to opt-out, see https://github.com/vaadin/vaadin-usage-statistics.
Vaadin collects usage statistics at development time to improve this product..
For details and to opt-out, see https://github.com/vaadin/vaadin-usage-statistics.
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc