# @types/leaflet-contextmenu

> TypeScript definitions for leaflet-contextmenu

Latest version **1.4.4** (published 2025-09-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/leaflet-contextmenu
pnpm add @types/leaflet-contextmenu
yarn add @types/leaflet-contextmenu
bun add @types/leaflet-contextmenu
```

## Health

**Score 55/100 (C)** — status: stable.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support.

Negative: stale.

## Facts

| | |
|---|---|
| Version | 1.4.4 |
| Published | 2025-09-03 |
| First published | 2023-04-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 4.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51430 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/leaflet-contextmenu
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/leaflet-contextmenu
- npm.io page: https://npm.io/package/@types/leaflet-contextmenu

## Dependencies (1)

- [@types/leaflet](https://npm.io/package/@types/leaflet.md) ^1.9

## Recent versions

- 1.4.4 (latest) — 2025-09-03
- 1.4.3 (ts4.5) — 2023-11-07
- 1.4.1 (ts4.3) — 2023-08-30
- 1.4.2 — 2023-10-18
- 1.4.0 — 2023-04-19

## README

# Installation
> `npm install --save @types/leaflet-contextmenu`

# Summary
This package contains type definitions for leaflet-contextmenu (https://github.com/aratcliffe/Leaflet.contextmenu).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/leaflet-contextmenu.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/leaflet-contextmenu/index.d.ts)
````ts
import { LatLng, Marker, Path, Point } from "leaflet";

declare module "leaflet" {
    interface ContextMenuItem {
        text: string;
        icon?: string;
        retinaIcon?: string;
        iconCls?: string;
        retinaIconCls?: string;
        disabled?: boolean;
        separator?: boolean;
        hideOnSelect?: boolean;
        index?: number;
        // map is the scope where contextmenu is defined.
        callback?: (ev: ContextMenuItemClickEvent, map?: Map) => void;
    }

    interface MapOptions {
        contextmenu: boolean;
        contextmenuItems: ContextMenuItem[];
    }

    interface MarkerOptions {
        contextmenu: boolean;
        contextmenuItems: ContextMenuItem[];
    }

    interface ContextMenuItemClickEvent {
        latlng: LatLng;
        layerPoint: Point;
        containerPoint: Point;
        relatedTarget: Marker | Path | undefined;
    }
}

````

### Additional Details
 * Last updated: Wed, 03 Sep 2025 08:02:47 GMT
 * Dependencies: [@types/leaflet](https://npmjs.com/package/@types/leaflet)

# Credits
These definitions were written by [Antonio Vida](https://github.com/antoniovlx).

---
_Source: https://npm.io/package/@types/leaflet-contextmenu · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
