Awesome Open Source
Awesome Open Source

Looking for maintainer. Contact [email protected] if you're interested.

React wrapper for Algolia Places codecovKnown VulnerabilitiesBuild Status

Blazing fast address autocomplete React/preact component. ⚡️


Checkout the demo at Demo GIF


npm install algolia-places-react --save


yarn add algolia-places-react


import React from 'react';
import AlgoliaPlaces from 'algolia-places-react';

export default () => {
  return (
      placeholder='Write an address here'

        appId: 'my-app-id',
        apiKey: 'sharing-is-caring',
        language: 'sv',
        countries: ['se'],
        type: 'city',
        // Other options from

      onChange={({ query, rawAnswer, suggestion, suggestionIndex }) => 
        console.log('Fired when suggestion selected in the dropdown or hint was validated.')}

      onSuggestions={({ rawAnswer, query, suggestions }) => 
        console.log('Fired when dropdown receives suggestions. You will receive the array of suggestions that are displayed.')}

      onCursorChanged={({ rawAnswer, query, suggestion, suggestonIndex }) => 
        console.log('Fired when arrows keys are used to navigate suggestions.')}

      onClear={() => 
        console.log('Fired when the input is cleared.')}

      onLimit={({ message }) => 
        console.log('Fired when you reached your current rate limit.')}

      onError={({ message }) => 
        console.log('Fired when we could not make the request to Algolia Places servers for any reason but reaching your rate limit.')}

Full API documentation

Live examples


Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
Javascript (1,554,267
Reactjs (72,722
React Components (2,365
Preact (799
Geocoding (339
Related Projects