Skip to main content
N
+40.7128Β°
-74.0060Β°
πŸ—ΊοΈ Now supporting USA πŸ‡ΊπŸ‡Έ & 200+ more!

Beautiful SVG World Maps
for JavaScript projects

Simple, lightweight, and interactive SVG maps with tooltips, labels, hover effects, and click support. Zero dependencies. Fully typed. Works everywhere.

212
Maps
100%
Pure SVG
npm version$ npm install svg-world-maps

Everything you need. Nothing you don't.

A batteries-included SVG map library designed for modern web development.

🌍

Massive Map Library

212+ SVG maps out of the box β€” World, USA, Germany, India, Brazil, Europe, Canada, and many more. All lightweight, pure SVG output.

πŸ‘†

Interactive & Clickable

Built-in hover tooltips, region labels, and click support via data-code and data-name attributes.

⚑

Framework Agnostic

Works seamlessly with React, Vue, Svelte, Vanilla JS, and more. Full TypeScript support with zero runtime dependencies.

🎨

Fully Customizable

Control every visual β€” background, borders, hover colors, tooltips, labels, and 8 preset sizes or a custom scale factor.

πŸ“¦

Tiny Bundles

Add only the maps you need via npx add-map. Keep your bundle small and lean β€” no bloat.

πŸ”§

One Simple API

One function to rule them all β€” createMap(). That's it. Generate stunning maps with a single call.

Quick Start

Build interactive maps in seconds.

One function call. A handful of options. Instant beautiful SVG maps with tooltips, labels, hover effects, and click handling β€” ready to drop into any project.

  • βœ… Tooltips & labels built-in
  • βœ… Click handlers via data attributes
  • βœ… 8 preset sizes + custom scaling
  • βœ… Full TypeScript support
app.tsx
import { createMap } from "svg-world-maps";

const map = createMap("world", {
background: "#e6f3ff",
borders: "#2c3e50",
hoverColor: "rgba(6, 182, 212, 0.3)",
tooltip: true,
showLabel: true,
size: "lg",
});

// Drop into React, Vue, Svelte, or vanilla JS!
document.getElementById("map")!.innerHTML = map;

Ready to build amazing maps?

Get started in less than a minute. Open source, MIT licensed, and loved by developers worldwide.