New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

address-autocomplete-react

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

address-autocomplete-react

Address autocomplete - A package for inputbox with autocomplete/autosuggest feature to allow users to search address across the globe. Using Photon / komoot geocoder for autocomplete. This is a React component that provides an autosuggest input box using

latest
npmnpm
Version
1.0.3
Version published
Maintainers
1
Created
Source

react-photon-location-input

This is a React component that provides an autosuggest input box using the Photon API for location search with OpenStreetMap data. It returns the selected location's name and coordinates.

Installation

Install the component via npm:

npm install address-autocomplete-react

LiveDemo

Click here to see it in action

Usage

import React, { useState } from "react";
import LocationInput from "address-autocomplete-react";

const MyApp = () => {
  const [coords, setCoords] = useState(null);

  const handleLocationSelect = (location) => {
    setCoords([location.lat, location.lon]);
    console.log("Selected location:", location);
  };

  return (
    <div>
      <LocationInput
        placeholder="Enter Drop Location..."
        onLocationSelect={handleLocationSelect}
      />
      {coords && <p>Selected coordinates: {coords.join(", ")}</p>}
    </div>
  );
};

export default MyApp;

Keywords

react

FAQs

Package last updated on 08 Oct 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