1. Components
  2. Maps

Third-Party Plugins

Tailwind CSS Maps

Build interactive maps with Leaflet! Add features like grayscale styles, custom pins, and city switching for seamless, mobile-friendly map experiences.

Requires Additional Installation

Note that this component requires the use of the third-party Leaflet plugin.

How to use

  1. Install Leaflet

    Install leaflet via npm

    npm i leaflet
  2. Add the Leaflet CSS

    Include the CSS <script> near the end of your </head> tag:

    <link rel="stylesheet" href="./node_modules/leaflet/dist/leaflet.css">
  3. Add the Leaflet JavaScript

    Include the JavaScript <script> near the end of your </head> tag:

    <script src="./node_modules/lodash/lodash.min.js"></script><script src="./node_modules/leaflet/dist/leaflet.js"></script>

Basic

Pin

Grayscale

Custom Pin

Custom popover

Change city