Update v4.2 - New components, 10+ framework guides, and quality improvements. Visit Changelog

Tailwind CSS Datamaps

Datamaps are customizable SVG map visualizations for the web. They offer intuitive geospatial insights by transforming raw data into interactive visual formats.

Requires Additional Installation

Datamaps are customizable SVG map visualizations for the web. They offer intuitive geospatial insights by transforming raw data into interactive visual formats.

Installation

  1. Install Datamaps

    Install datamaps via npm

    Terminal
                              
                                npm i datamaps
                              
                            
  2. Add the Datamaps JavaScript

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

    HTML
                              
                            
    To fix the stuck hover highlight / broken clicks issue in Chrome/Chromium, comment out the moveToFront block in handleGeographyConfig:
                                    
                                      // if ( ! /((MSIE)|(Trident))/.test(navigator.userAgent) ) {
                                      //   moveToFront.call(this);
                                      // }
                                    
                                  
    See Issue #557.

World datamap

Render a basic world map with Datamaps as a starting point for region-based data visualizations.

© 2026 Preline Labs.