1.0.21 • Published 4 months ago

google-location-autocomplete-react v1.0.21

Weekly downloads
-
License
-
Repository
github
Last release
4 months ago

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

1.0.19

4 months ago

1.0.18

4 months ago

1.0.17

4 months ago

1.0.16

4 months ago

1.0.9

4 months ago

1.0.8

4 months ago

1.0.7

4 months ago

1.0.6

4 months ago

1.0.5

4 months ago

1.0.4

4 months ago

1.0.11

4 months ago

1.0.21

4 months ago

1.0.10

4 months ago

1.0.20

4 months ago

1.0.15

4 months ago

1.0.14

4 months ago

1.0.13

4 months ago

1.0.2

5 months ago

1.0.3

5 months ago

1.0.1

5 months ago

1.0.0

5 months ago