JustFly1984/react-google-maps-api

React Google Maps API

TypeScript

1,975

2,023 commits

updated May 7, 2026

See the code

README

logo

@react-google-maps/api

React components and hooks for Google Maps JavaScript API

npm package npm downloads npm bundle size TypeScript React 19

Documentation · NPM Package · Examples

Commercial License

Version 3.x and later of @react-google-maps/api is commercial software. For licensing information and pricing, visit our documentation:

For open-source use, please see our GitHub repository for community-supported versions.

Overview

@react-google-maps/api provides declarative React components for the Google Maps JavaScript API. Build interactive maps with markers, overlays, directions, and more using familiar React patterns.

Features

  • Hooks-based API - useJsApiLoader, useGoogleMap, and more
  • Full TypeScript support - Complete type definitions included
  • React 19 compatible - Works with the latest React features
  • Tree-shakeable - Only bundle what you use (~12kb gzipped)
  • SSR friendly - Works with Next.js, Remix, and other frameworks

Quick Start

# npm
npm install @react-google-maps/api

# yarn
yarn add @react-google-maps/api

# bun
bun add @react-google-maps/api
import { GoogleMap, useJsApiLoader } from '@react-google-maps/api';
import { useMemo, useCallback, useState, type JSX } from 'react';

function Map(): JSX.Element {
  const { isLoaded } = useJsApiLoader({
    googleMapsApiKey: 'YOUR_API_KEY',
  });

  const center = useMemo(() => ({ lat: 40.7128, lng: -74.006 }), []);
  const containerStyle = useMemo(() => ({ width: '100%', height: '400px' }), []);

  if (!isLoaded) return <div>Loading...</div>;

  return (
    <GoogleMap
      mapContainerStyle={containerStyle}
      center={center}
      zoom={12}
    />
  );
}

Documentation

For full API documentation and examples, see:

Community

Contributing

We welcome contributions! See our contributing guide to get started.

Development Setup

# Clone the repository
git clone https://github.com/JustFly1984/react-google-maps-api.git
cd react-google-maps-api

# Install dependencies
bun install

# Set up workspace
bun run bootstrap

Requirements

Support

If you find this library useful, consider sponsoring the project.

gatsby
google-map
google-map-react
google-maps
google-maps-api
google-maps-javascript
google-maps-javascript-api
google-maps-react
react
react-google-map
react-google-map-example
react-google-maps
react-google-maps-api

JustFly1984/react-google-maps-api

React Google Maps API

TypeScript

1,975

2,023 commits

updated May 7, 2026

See the code

README

logo

@react-google-maps/api

React components and hooks for Google Maps JavaScript API

npm package npm downloads npm bundle size TypeScript React 19

Documentation · NPM Package · Examples

Commercial License

Version 3.x and later of @react-google-maps/api is commercial software. For licensing information and pricing, visit our documentation:

For open-source use, please see our GitHub repository for community-supported versions.

Overview

@react-google-maps/api provides declarative React components for the Google Maps JavaScript API. Build interactive maps with markers, overlays, directions, and more using familiar React patterns.

Features

  • Hooks-based API - useJsApiLoader, useGoogleMap, and more
  • Full TypeScript support - Complete type definitions included
  • React 19 compatible - Works with the latest React features
  • Tree-shakeable - Only bundle what you use (~12kb gzipped)
  • SSR friendly - Works with Next.js, Remix, and other frameworks

Quick Start

# npm
npm install @react-google-maps/api

# yarn
yarn add @react-google-maps/api

# bun
bun add @react-google-maps/api
import { GoogleMap, useJsApiLoader } from '@react-google-maps/api';
import { useMemo, useCallback, useState, type JSX } from 'react';

function Map(): JSX.Element {
  const { isLoaded } = useJsApiLoader({
    googleMapsApiKey: 'YOUR_API_KEY',
  });

  const center = useMemo(() => ({ lat: 40.7128, lng: -74.006 }), []);
  const containerStyle = useMemo(() => ({ width: '100%', height: '400px' }), []);

  if (!isLoaded) return <div>Loading...</div>;

  return (
    <GoogleMap
      mapContainerStyle={containerStyle}
      center={center}
      zoom={12}
    />
  );
}

Documentation

For full API documentation and examples, see:

Community

Contributing

We welcome contributions! See our contributing guide to get started.

Development Setup

# Clone the repository
git clone https://github.com/JustFly1984/react-google-maps-api.git
cd react-google-maps-api

# Install dependencies
bun install

# Set up workspace
bun run bootstrap

Requirements

Support

If you find this library useful, consider sponsoring the project.

gatsby
google-map
google-map-react
google-maps
google-maps-api
google-maps-javascript
google-maps-javascript-api
google-maps-react
react
react-google-map
react-google-map-example
react-google-maps
react-google-maps-api

Project health

Overall

4.6/10

Maintained

0/10

Code review

6/10
OpenSSF Scorecard

Latest release

1.0.8 · Jan 18, 2019

Releases this year

0
Deprecated

Significant stargazers

Wojciech Maj

3,571 followers · starred Aug 2020

Aaron Lichtman

515 followers · starred May 2023

Ashwin Ramaswami

359 followers · starred Jul 2019

laixintao

1,648 followers · starred Mar 2024