React maps libraries

Updated Nov 2026

React map libraries render interactive maps inside React components, with markers, layers, and camera controls. A wrapper either exposes an existing map engine such as Leaflet, MapLibre, or Google Maps as components or draws geographic data itself. These libraries let apps show store locators, delivery routes, and geographic data on maps that users can pan and zoom.

Popularity

React Leaflet has the most monthly downloads in this comparison, at 23.0M.

LibraryMonthly downloadsStarsLast releaseLicense
React Leaflet
23.0M
5.6KDec 2024Hippocratic-2.1
react-map-gl
12.1M
8.5KSep 2026MIT
@vis.gl/react-google-maps
11.3M
1.9KOct 2026MIT
@react-google-maps/api
8.8M
2.0KDec 2025MIT
React Simple Maps
5.6M
3.4KSep 2026MIT
@deck.gl/react
2.6M
14.8KOct 2026MIT
Google Map React
1.9M
6.5KMay 2025MIT
react-mapbox-gl
527.2K
2.0KNov 2020MIT
Downloads: npm, last thirty days. Stars and releases: GitHub. Amber: no release in over a year.

Libraries and code examples

Exposes Leaflet map layers as React components.

Downloads / mo
23.0M
Stars
5.6K
Last release
5.0.0
License
Hippocratic-2.1
Runs on
Leaflet

Strengths

  • Wraps familiar Leaflet layers. Use Leaflet layers through React components.
  • Exposes Leaflet map instances. Access the Leaflet map through useMap.

Limitations

  • Initial camera props stay fixed. Changing MapContainer props later does not update the existing map.
  • Needs client-side loading. Load the map on the client in server-rendered applications.

Quickstart

From App.tsx
$ npm install react-leaflet@5.0.0 leaflet
import type { LatLngTuple } from 'leaflet'
import React from 'react'
import { MapContainer, Marker, Popup, TileLayer } from 'react-leaflet'

const position: LatLngTuple = [51.505, -0.09,]

export default function App() {
  return (
    <MapContainer center={position} zoom={13} scrollWheelZoom={false}>
      <TileLayer
        attribution='&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
        url="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"
      />
      <Marker position={position}>
        <Popup>
          A pretty CSS3 popup. <br />
        </Popup>
      </Marker>
    </MapContainer>
  )
}

React Leaflet examples

From open-source projects on GitHub

Provides React components for MapLibre and Mapbox map renderers.

Downloads / mo
12.1M
Stars
8.5K
Last release
8.1.3
License
MIT
Runs on
MapLibre or Mapbox

Strengths

  • Supports MapLibre and Mapbox. Choose the map engine and obtain compatible map tiles.
  • Synchronizes controlled map cameras. Share camera state between maps and surrounding React components.

Limitations

  • Mapbox needs a billable token. Provide a Mapbox token when using the Mapbox renderer.
  • Custom forks are unsupported. Use supported Mapbox or MapLibre versions rather than arbitrary forks.

Quickstart

From README.md
$ npm install react-map-gl@8.1.3 maplibre-gl@5
// Using Maplibre
import * as React from 'react';
import Map from 'react-map-gl/maplibre';
import 'maplibre-gl/dist/maplibre-gl.css';

function App() {
  return (
    <Map
      initialViewState={{
        longitude: -122.4,
        latitude: 37.8,
        zoom: 14
      }}
      style={{width: 600, height: 400}}
      mapStyle="https://api.maptiler.com/maps/streets/style.json?key=<Maptiler access token>"
    />
  );
}

react-map-gl examples

From open-source projects on GitHub

@vis.gl/react-google-maps

Provides React components and hooks for the Google Maps JavaScript API.

Downloads / mo
11.3M
Stars
1.9K
Last release
1.10.2
License
MIT
Runs on
Google Maps JavaScript API

Strengths

  • Customizes advanced markers with React. Render React children instead of the default marker pin.
  • Supports controlled map cameras. Keep camera position synchronized with application state through controlled props.

Limitations

  • Advanced markers need map IDs. Assign a mapId before rendering an AdvancedMarker.
  • Changing map IDs recreates maps. Changing mapId, colorScheme, or renderingType recreates the map and adds cost.

Quickstart

From README.md
$ npm install @vis.gl/react-google-maps
import {AdvancedMarker, APIProvider, Map} from '@vis.gl/react-google-maps';

function App() {
  const position = {lat: 53.54992, lng: 10.00678};

  return (
    <APIProvider apiKey={'YOUR API KEY HERE'}>
      <Map defaultCenter={position} defaultZoom={10} mapId="DEMO_MAP_ID">
        <AdvancedMarker position={position} />
      </Map>
    </APIProvider>
  );
}

export default App;

@react-google-maps/api

Provides React bindings for the Google Maps API.

Downloads / mo
8.8M
Stars
2.0K
Last release
2.20.8
License
MIT
Runs on
Google Maps JavaScript API

Strengths

  • Provides a map-loading hook. Wait for useJsApiLoader before rendering a GoogleMap.
  • Includes a map-access hook. Access the map instance through useGoogleMap.

Limitations

  • Wait for the API script. Read window.google only after the Google Maps script has loaded.

Quickstart

From README.md
$ npm install @react-google-maps/api
import { GoogleMap, useJsApiLoader } from '@react-google-maps/api';
const center = { lat: -3.745, lng: -38.523 };
export default function MapExample() {
  const { isLoaded } = useJsApiLoader({ googleMapsApiKey: 'YOUR_API_KEY' });
  return isLoaded ? <GoogleMap
    mapContainerStyle={{ width: '400px', height: '400px' }}
    center={center} zoom={10} /> : null;
}

@react-google-maps/api examples

From open-source projects on GitHub

React Simple Maps

Builds maps from React components with d3-geo, with optional zoom and pan.

Downloads / mo
5.6M
Stars
3.4K
Last release
5.0.5
License
MIT

Quickstart

From README.md
$ npm install react-simple-maps
import { ComposableMap, Geographies, Geography } from "react-simple-maps"

// url to a valid TopoJSON file
const geoUrl = "/path/to/my-topojson-file.json"

const SampleMap = () => {
  return (
    <ComposableMap>
      <Geographies geography={geoUrl}>
        {({ geographies }) =>
          geographies.map((geo) => (
            <Geography key={geo.rsmKey} geography={geo} />
          ))
        }
      </Geographies>
    </ComposableMap>
  )
}

React Simple Maps examples

From open-source projects on GitHub

@deck.gl/react

Provides React components for deck.gl.

Downloads / mo
2.6M
Stars
14.8K
Last release
9.4.1
License
MIT

Quickstart

From using-with-react.md
$ npm install @deck.gl/react@~9.4.0 @deck.gl/core@~9.4.0 @deck.gl/layers@~9.4.0 @deck.gl/widgets@~9.4.0
import { DeckGL } from '@deck.gl/react';
import { ScatterplotLayer } from '@deck.gl/layers';
const data = [{ position: [-122.4, 37.8] }];
export default function MapExample() {
  const layers = [new ScatterplotLayer({ id: 'points', data,
    getPosition: d => d.position, getRadius: 100, getFillColor: [255, 0, 0] })];
  return <DeckGL initialViewState={{ longitude: -122.4, latitude: 37.8, zoom: 11 }}
    controller layers={layers} />;
}

Google Map React

Renders React components on a Google map.

Downloads / mo
1.9M
Stars
6.5K
Last release
2.2.5
License
MIT

Quickstart

From README.md
$ npm install google-map-react
import React from "react";
import GoogleMapReact from 'google-map-react';

const AnyReactComponent = ({ text }) => <div>{text}</div>;

export default function SimpleMap(){
  const defaultProps = {
    center: {
      lat: 10.99835602,
      lng: 77.01502627
    },
    zoom: 11
  };

  return (
    // Important! Always set the container height explicitly
    <div style={{ height: '100vh', width: '100%' }}>
      <GoogleMapReact
        bootstrapURLKeys={{ key: "" }}
        defaultCenter={defaultProps.center}
        defaultZoom={defaultProps.zoom}
      >
        <AnyReactComponent
          lat={59.955413}
          lng={30.337844}
          text="My Marker"
        />
      </GoogleMapReact>
    </div>
  );
}

react-mapbox-gl

Provides React bindings for mapbox-gl-js.

Downloads / mo
527.2K
Stars
2.0K
Last release
5.1.1
License
MIT

Quickstart

From API.md
$ npm install react-mapbox-gl mapbox-gl@^1.13.0
import ReactMapboxGl from 'react-mapbox-gl';
const Map = ReactMapboxGl({ accessToken: 'YOUR_MAPBOX_TOKEN' });
export default function MapExample() {
  return <Map style='YOUR_AUTHORIZED_STYLE_URL'
    containerStyle={{ width: '100%', height: '400px' }} />;
}

FAQ

React Leaflet suits apps built on Leaflet layers. react-map-gl suits MapLibre or Mapbox maps with controlled cameras. @vis.gl/react-google-maps suits Google Maps with React-rendered advanced markers.

React Leaflet exposes Leaflet map layers as React components. Changing MapContainer props after the first render does not update the existing map.

react-map-gl provides React components for MapLibre and Mapbox map renderers. The Mapbox renderer needs a billable Mapbox token.

@vis.gl/react-google-maps provides React components and hooks for the Google Maps JavaScript API. @react-google-maps/api provides React bindings with a hook that waits for the API script to load.

For coding agents

Found your maps library? Help your agent use it.

Connect Exa so your coding agent can find the library’s documentation, check its API, and look up implementations while you build.

Run in your terminal

claude plugin install exa@claude-plugins-official