Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

google-location-autocomplete-react

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

google-location-autocomplete-react

`google-location-autocomplete-react` is a simple and reusable React component that leverages the Google Maps Places Autocomplete API. It allows for easy integration of Google's location autocomplete functionality into your React applications.

  • 1.0.7
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
decreased by-72.73%
Maintainers
1
Weekly downloads
 
Created
Source

Google Location Autocomplete for React

google-location-autocomplete-react is a simple and reusable React component that leverages the Google Maps Places Autocomplete API. It allows for easy integration of Google's location autocomplete functionality into your React applications.

Repository

The source code is available at GitHub.

Feel free to dive in, open issues, and submit pull requests. Contributions are welcome!

Features

  • Easy integration with React projects.
  • Customizable styling using className prop.
  • Utilizes Google Maps Places Autocomplete API.

Installation

To install the component, run the following command in your project directory:

npm install google-location-autocomplete-react

Usage

Here's a basic example of how to use the GoogleLocationAutocomplete component in your React application:

import React from 'react';
import GoogleLocationAutocomplete from 'google-location-autocomplete-react';

function MyComponent() {
  return (
    <div>
      <GoogleLocationAutocomplete
        apiKey="YOUR_GOOGLE_API_KEY"
        className="your-custom-class"
      />
    </div>
  );
}

export default MyComponent;

Replace "YOUR_GOOGLE_API_KEY" with your actual Google API key. Apply any custom styling by replacing "your-custom-class" with your desired Tailwind CSS or custom CSS classes.

Props

  • apiKey (string): Your Google API key. Required
  • className (string): Optional CSS classes for styling.

Requirements

  • React 17.0.0 or later.
  • A valid Google API key with Google Maps JavaScript API and Places API enabled.

Contributing

Contributions are welcome! Please feel free to submit a pull request or create an issue for any enhancements, bug fixes, or feature requests.

Support

If you encounter any problems or have any queries regarding the usage of this component, please open an issue on the GitHub repository. **

FAQs

Package last updated on 17 Jan 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc