# React maps libraries

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

| Library | Monthly downloads | Stars | Last release | License |
| --- | --- | --- | --- | --- |
| [React Leaflet](#react-leaflet) | 23.0M | 5.6K | Dec 2024 | Hippocratic-2.1 |
| [react-map-gl](#react-map-gl) | 12.1M | 8.5K | Sep 2026 | MIT |
| [@vis.gl/react-google-maps](#vis-gl-react-google-maps) | 11.3M | 1.9K | Oct 2026 | MIT |
| [@react-google-maps/api](#react-google-maps-api) | 8.8M | 2.0K | Dec 2025 | MIT |
| [React Simple Maps](#react-simple-maps) | 5.6M | 3.4K | Sep 2026 | MIT |
| [@deck.gl/react](#deck-gl-react) | 2.6M | 14.8K | Oct 2026 | MIT |
| [Google Map React](#google-map-react) | 1.9M | 6.5K | May 2025 | MIT |
| [react-mapbox-gl](#react-mapbox-gl) | 527.2K | 2.0K | Nov 2020 | MIT |

Downloads: npm, last thirty days. Stars and releases: GitHub. Amber: no release in over a year.

[React Leaflet](#react-leaflet) has the most monthly downloads in this comparison, at 23.0M.

## Capabilities

| Library | Self-hosted renderer | Renders without GPU APIs |
| --- | --- | --- |
| [React Leaflet](#react-leaflet) | Yes | Yes |
| [react-map-gl](#react-map-gl) | Yes | No |
| [@vis.gl/react-google-maps](#vis-gl-react-google-maps) | No | Yes |
| [@react-google-maps/api](#react-google-maps-api) | No | Yes |
| [React Simple Maps](#react-simple-maps) | Yes | Yes |
| [@deck.gl/react](#deck-gl-react) | Yes | No |
| [Google Map React](#google-map-react) | No | Yes |
| [react-mapbox-gl](#react-mapbox-gl) | Yes | No |

## Libraries

### React Leaflet

[GitHub](https://github.com/PaulLeCam/react-leaflet) · [npm](https://www.npmjs.com/package/react-leaflet) · [Docs](https://react-leaflet.js.org/)

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
- Capabilities: [From the React Leaflet docs](https://react-leaflet.js.org/)

**Strengths**

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

**Watch out for**

- **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.

```sh
npm install react-leaflet@5.0.0 leaflet
```

**sudeepmahato16/airbnb-clone** (117 stars)

[sudeepmahato16/airbnb-clone](https://github.com/sudeepmahato16/airbnb-clone) 

```typescript
const Map: React.FC<MapProps> = ({ center }) => {
  return (
    <MapContainer
      center={(center as L.LatLngExpression) || [52, -0.09]}
      zoom={center ? 4 : 2}
      scrollWheelZoom={false}
      className={`h-full rounded-lg`}
    >
      <TileLayer
        attribution='&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
        url="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"
      />
      {center && <Marker position={center as L.LatLngExpression} />}
    </MapContainer>
  );
};

```

[components/Map.tsx](https://github.com/sudeepmahato16/airbnb-clone/blob/fe8a793e7f7e296e8f52a050b1536fb756323f5d/components/Map.tsx#L23-L38) · [More projects using React Leaflet →](https://dashboard.exa.ai/playground/search?q=React%20projects%20that%20use%20react-leaflet%20for%20interactive%20maps%2C%20map%20markers%2C%20camera%20updates%20and%20location%20interfaces&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D)

**akursat/react-leaflet-cluster** (134 stars)

[akursat/react-leaflet-cluster](https://github.com/akursat/react-leaflet-cluster) 

```typescript
export default function TenThousandMarker() {
  return (
    <div>
      <h2>10,000 Markers Example</h2>
      <MapContainer
        style={{ height: '500px' }}
        center={[-41.975762, 172.934298]}
        zoom={4}
        scrollWheelZoom={true}
      >
        <TileLayer
          attribution='&copy; <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
          url="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"
        />
        <MarkerClusterGroup chunkedLoading>
          {(addressPoints as AddressPoint).map((address, index) => (
            <Marker key={index} position={[address[0], address[1]]} title={address[2]} />
          ))}
        </MarkerClusterGroup>
      </MapContainer>
    </div>
  )
}

```

[examples/vite-example/src/components/TenThousandMarker.tsx](https://github.com/akursat/react-leaflet-cluster/blob/53a827e0444d431b5c8bfa5f0bd7ef6172eb2ca5/examples/vite-example/src/components/TenThousandMarker.tsx#L20-L42) · [More projects using React Leaflet →](https://dashboard.exa.ai/playground/search?q=React%20projects%20that%20use%20react-leaflet%20for%20interactive%20maps%2C%20map%20markers%2C%20camera%20updates%20and%20location%20interfaces&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D)

**Quickstart**

```typescript
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>
  )
}
```

From [App.tsx](https://github.com/PaulLeCam/react-leaflet/blob/master/example/App.tsx)

### react-map-gl

[GitHub](https://github.com/visgl/react-map-gl) · [npm](https://www.npmjs.com/package/react-map-gl) · [Docs](https://visgl.github.io/react-map-gl/docs)

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
- Capabilities: [From the react-map-gl docs](https://visgl.github.io/react-map-gl/docs)

**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.

**Watch out for**

- **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.

```sh
npm install react-map-gl@8.1.3 maplibre-gl@5
```

**keplergl/kepler.gl** (12.1K stars)

[keplergl/kepler.gl](https://github.com/keplergl/kepler.gl) 

```typescript
mapRef => {
      // Handle change of the map library
      if (this._map && mapRef) {
        const map = mapRef.getMap();
        if (map && this._map !== map) {
          this._map?.off(MAPBOXGL_STYLE_UPDATE, nop);
          this._map?.off(MAPBOXGL_RENDER, nop);
          this._map = null;
        }
      }

      if (!this._map && mapRef) {
        this._map = mapRef.getMap();
        // i noticed in certain context we don't access the actual map element
        if (!this._map) {
          return;
        }
        // bind mapboxgl event listener
        this._map.on(MAPBOXGL_STYLE_UPDATE, this._onMapboxStyleUpdate);

        this._map.on(MAPBOXGL_RENDER, () => {
          if (typeof this.props.onMapRender === 'function') {
            this.props.onMapRender(this._map);
          }
        });
      }

      if (this.props.getMapboxRef) {
        // The parent component can gain access to our MapboxGlMap by
        // providing this callback. Note that 'mapbox' will be null when the
        // ref is unset (e.g. when a split map is closed).
        this.props.getMapboxRef(mapRef, this.props.index);
      }
    }

```

[src/components/src/map-container.tsx](https://github.com/keplergl/kepler.gl/blob/49f4c3de270652e7f8e46394ad46b9b0b2654b1f/src/components/src/map-container.tsx#L552-L585) · [More projects using react-map-gl →](https://dashboard.exa.ai/playground/search?q=React%20projects%20that%20use%20react-map-gl%20for%20interactive%20maps%2C%20map%20markers%2C%20camera%20updates%20and%20location%20interfaces&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D)

**Quickstart**

```typescript
// 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>"
    />
  );
}

```

From [README.md](https://github.com/visgl/react-map-gl/blob/master/README.md)

### @vis.gl/react-google-maps

[GitHub](https://github.com/visgl/react-google-maps) · [npm](https://www.npmjs.com/package/@vis.gl/react-google-maps) · [Docs](https://visgl.github.io/react-google-maps/docs)

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
- Capabilities: [From the @vis.gl/react-google-maps docs](https://visgl.github.io/react-google-maps/docs)

**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.

**Watch out for**

- **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.

```sh
npm install @vis.gl/react-google-maps
```

**Quickstart**

```typescript
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;

```

From [README.md](https://github.com/visgl/react-google-maps/blob/main/README.md) · [Find projects using @vis.gl/react-google-maps →](https://dashboard.exa.ai/playground/search?q=React%20projects%20that%20use%20%40vis.gl/react-google-maps%20for%20interactive%20maps%2C%20map%20markers%2C%20camera%20updates%20and%20location%20interfaces&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D)

### @react-google-maps/api

[GitHub](https://github.com/JustFly1984/react-google-maps-api) · [npm](https://www.npmjs.com/package/@react-google-maps/api) · [Docs](https://react-google-maps-api-docs.netlify.app/)

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
- Capabilities: [From the @react-google-maps/api docs](https://react-google-maps-api-docs.netlify.app/)

**Strengths**

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

**Watch out for**

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

```sh
npm install @react-google-maps/api
```

**lowdefy/lowdefy** (3.0K stars)

[lowdefy/lowdefy](https://github.com/lowdefy/lowdefy) 

```typescript
const Map = ({ blockId, children, classNames = {}, content, methods, properties, styles = {} }) => {
  const [map, setMap] = useState();
  const [bounds, setBounds] = useState();

  useEffect(() => {
    methods.registerMethod('fitBounds', (args) => {
      if (!bounds || !map) {
        throw new Error('fitBounds can only be called once google maps has been mounted.');
      }
      (args?.bounds ?? []).forEach((position) => {
        bounds.extend(position);
      });
      map.fitBounds(bounds);
      if (args.zoom) {
        map.setZoom(args.zoom);
      }
    });

    methods.registerMethod('getBounds', () => {
      return map.getBounds();
    });

    methods.registerMethod('getCenter', () => {
      return map.getCenter();
    });

    methods.registerMethod('getZoom', () => {
      return map.getZoom();
    });
  }, [bounds, map]);

  // by default, fit infoWindow and markers to bounds
  if (properties.autoBounds !== false && bounds && map) {
    if (properties.infoWindow) {
      bounds.extend(properties.infoWindow.position ?? MAP_DEFAULTS.center);
    }
    (properties.markers ?? []).forEach((marker) => {
      bounds.extend(marker.position);
    });
    (properties.markerClusterers ?? []).forEach((markerClusterer) => {
      (markerClusterer.markers ?? []).forEach((marker) => {
        bounds.extend(marker.position);
      });
    });
    if (!properties.map?.center && !properties.map?.zoom && MAP_PROPS.zoom === null) {
      map.fitBounds(bounds);
      MAP_PROPS.zoom = map.getZoom();
    }
  }

  if (
    properties.map?.center &&
    (properties.map.center?.lat !== MAP_PROPS.center.lat ||
      properties.map.center?.lng !== MAP_PROPS.center.lng)
  ) {
    MAP_PROPS.center = properties.map.center;
  }

  if (properties.map?.zoom && properties.map.zoom !== MAP_PROPS.zoom) {
    MAP_PROPS.zoom = properties.map.zoom;
  }

  return (
    <GoogleMap
      {...properties.map} // https://react-google-maps-api-docs.netlify.app/#googlemap
      id={blockId}
      mapContainerClassName={classNames.element}
      mapContainerStyle={{ ...STYLE_DEFAULTS, ...styles.element }}
      center={MAP_PROPS.center}
      zoom={MAP_PROPS.zoom}
      onLoad={(newMap, event) => {
        setMap(newMap);
        setBounds(new window.google.maps.LatLngBounds());
        methods.triggerEvent({
          name: 'onLoad',
          event,
        });
      }}
      onBoundsChanged={() => {
        methods.triggerEvent({
          name: 'onBoundsChanged',
          event: { center: map?.getCenter(), bounds: map?.getBounds(), zoom: map?.getZoom() },
        });
      }}
      onCenterChanged={() => {
        methods.triggerEvent({
          name: 'onCenterChanged',
          event: { center: map?.getCenter(), bounds: map?.getBounds(), zoom: map?.getZoom() },
        });
      }}
      onClick={(event) => {
        methods.triggerEvent({
          name: 'onClick',
          event,
        });
      }}
      onZoomChanged={() => {
        if (map) {
          MAP_PROPS.zoom = map.getZoom();
        }
        methods.triggerEvent({
          name: 'onZoomChanged',
          event: { center: map?.getCenter(), bounds: map?.getBounds(), zoom: map?.getZoom() },
        });
      }}
    >
      {(properties.markers ?? []).map((marker, i) => (
        <Marker
          {...marker} // https://react-google-maps-api-docs.netlify.app/#marker
          key={i}
          onClick={(event) => {
            methods.triggerEvent({
              name: 'onMarkerClick',
              event,
            });
          }}
        />
      ))}
      {(properties.markerClusterers ?? []).map((markerClusterer, i) => (
        <MarkerClusterer
          key={i}
          {...markerClusterer.options}
          onClick={(event) => {
            methods.triggerEvent({
              name: 'onClusterClick',
              event,
            });
          }}
        >
          {(clusterer) =>
            markerClusterer?.markers.map((marker, i) => (
              <Marker
                {...marker}
                key={i}
                clusterer={clusterer} // https://react-google-maps-api-docs.netlify.app/#markerclusterer
                onClick={(event) => {
                  methods.triggerEvent({
                    name: 'onMarkerClick',
                    event,
                  });
                }}
              />
            ))
          }
        </MarkerClusterer>
      ))}
      {properties.infoWindow?.visible === true && (
        <InfoWindow
          {...properties.infoWindow} // https://react-google-maps-api-docs.netlify.app/#infowindow
          onCloseClick={() => {
            methods.triggerEvent({
              name: 'onInfoWindowCloseClick',
            });
          }}
          onPositionChanged={() => {
            methods.triggerEvent({
              name: 'onInfoWindowPositionChanged',
            });
          }}
        >
          {content.infoWindow && content.infoWindow()}
        </InfoWindow>
      )}
      {children?.(map, bounds)}
    </GoogleMap>
  );
};

```

[packages/plugins/blocks/blocks-google-maps/src/blocks/Map.js](https://github.com/lowdefy/lowdefy/blob/a8b67534374208ba93709957cd067930b0ae75e2/packages/plugins/blocks/blocks-google-maps/src/blocks/Map.js#L43-L209) · [More projects using @react-google-maps/api →](https://dashboard.exa.ai/playground/search?q=React%20projects%20that%20use%20%40react-google-maps/api%20for%20interactive%20maps%2C%20map%20markers%2C%20camera%20updates%20and%20location%20interfaces&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D)

**Quickstart**

```typescript
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;
}

```

From [README.md](https://cdn.jsdelivr.net/npm/@react-google-maps/api@2.20.8/dist/index.d.ts)

### React Simple Maps

[GitHub](https://github.com/zcreativelabs/react-simple-maps) · [npm](https://www.npmjs.com/package/react-simple-maps) · [Docs](https://www.react-simple-maps.io/)

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
- Capabilities: [From the React Simple Maps docs](https://www.react-simple-maps.io/)

```sh
npm install react-simple-maps
```

**lissy93/web-check** (35.5K stars)

[lissy93/web-check](https://github.com/lissy93/web-check) 

```tsx
const MapChart = (location: Props) => {
  const { lat, lon, label } = location;

  return (
    <ComposableMap
      projection="geoAzimuthalEqualArea"
      projectionConfig={{
        rotate: [0, 0, 0],
        center: [lon + 5, lat - 25],
        scale: 200,
      }}
    >
      <Geographies
        geography={MapFeatures}
        fill={colors.backgroundDarker}
        stroke={colors.primary}
        strokeWidth={0.5}
      >
        {({ geographies }: any) =>
          geographies.map((geo: any) => <Geography key={geo.rsmKey} geography={geo} />)
        }
      </Geographies>
      <Annotation
        subject={[lon, lat]}
        dx={-80}
        dy={-80}
        connectorProps={{
          stroke: colors.textColor,
          strokeWidth: 3,
          strokeLinecap: 'round',
        }}
      >
        <text x="-8" textAnchor="end" fill={colors.textColor} fontSize={25}>
          {label || 'Server'}
        </text>
      </Annotation>
    </ComposableMap>
  );
};

```

[src/client/components/misc/LocationMap.tsx](https://github.com/lissy93/web-check/blob/9154bd43e8276c0310c29c86ac70648e1ed4eda5/src/client/components/misc/LocationMap.tsx#L12-L50) · [More projects using React Simple Maps →](https://dashboard.exa.ai/playground/search?q=react-simple-maps%20GitHub%20projects)

**Quickstart**

```tsx
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>
  )
}

```

From [README.md](https://raw.githubusercontent.com/zcreativelabs/react-simple-maps/main/README.md)

### @deck.gl/react

[GitHub](https://github.com/visgl/deck.gl) · [npm](https://www.npmjs.com/package/@deck.gl/react) · [Docs](https://deck.gl/docs)

Provides React components for deck.gl.

- Downloads / mo: 2.6M
- Stars: 14.8K
- Last release: 9.4.1
- License: MIT
- Capabilities: [From the @deck.gl/react docs](https://deck.gl/docs)

```sh
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
```

**Quickstart**

```tsx
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} />;
}

```

From [using-with-react.md](https://deck.gl/docs/get-started/using-with-react) · [Find projects using @deck.gl/react →](https://dashboard.exa.ai/playground/search?q=%40deck.gl/react%20GitHub%20projects)

### Google Map React

[GitHub](https://github.com/GoogleMapReact/google-map-react) · [npm](https://www.npmjs.com/package/google-map-react)

Renders React components on a Google map.

- Downloads / mo: 1.9M
- Stars: 6.5K
- Last release: 2.2.5
- License: MIT
- Capabilities: [From the Google Map React docs](https://github.com/GoogleMapReact/google-map-react)

```sh
npm install google-map-react
```

**Quickstart**

```tsx
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>
  );
}

```

From [README.md](https://raw.githubusercontent.com/google-map-react/google-map-react/master/README.md) · [Find projects using Google Map React →](https://dashboard.exa.ai/playground/search?q=google-map-react%20GitHub%20projects)

### react-mapbox-gl

[GitHub](https://github.com/alex3165/react-mapbox-gl) · [npm](https://www.npmjs.com/package/react-mapbox-gl)

Provides React bindings for mapbox-gl-js.

- Downloads / mo: 527.2K
- Stars: 2.0K
- Last release: 5.1.1
- License: MIT
- Capabilities: [From the react-mapbox-gl docs](https://github.com/alex3165/react-mapbox-gl)

```sh
npm install react-mapbox-gl mapbox-gl@^1.13.0
```

**Quickstart**

```tsx
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' }} />;
}

```

From [API.md](https://raw.githubusercontent.com/alex3165/react-mapbox-gl/master/docs/API.md) · [Find projects using react-mapbox-gl →](https://dashboard.exa.ai/playground/search?q=react-mapbox-gl%20GitHub%20projects)

## FAQ

### Which React map library should I use?

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

### What is React Leaflet?

[React Leaflet](#react-leaflet) exposes Leaflet map layers as React components. Changing MapContainer props after the first render does not update the existing map.

### What is react-map-gl?

[react-map-gl](#react-map-gl) provides React components for MapLibre and Mapbox map renderers. The Mapbox renderer needs a billable Mapbox token.

### How do I use Google Maps in React?

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

## How this page was built

Data checked Nov 20, 2026.

Reproduce it with the Exa API:

```json
{
  "endpoint": "/search",
  "body": {
    "query": "React maps libraries React Leaflet react-map-gl vis.gl react-google-maps react-google-maps api examples",
    "numResults": 5
  }
}
```

Docs: https://exa.ai/docs/reference/search
