Skip to content

ThibautGery/ban-autocomplete-react

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Base adresse nationale autocomplete box (React)

Circle CI Coverage Status

React component to autocomplete addresses using the Base adresses nationale (BAN) API.

Requirements

This widget is written in ECMA 2015.

  • Node
  • NPM
  • Chrome (to run the test)

Install

cd path/to/your/project
npm install ban-autocomplete-react --save

Setup

Simple script reference

<body>
  <div>
    <script src="./node_modules/ban-autocomplete-react/src/client/public/bundle.js" type="text/javascript"></script>
  </div>
</body>

See an example in index.html.

Webpack

import AutocompleteBan from 'ban-autocomplete-react';
//If you have a div#widget-container to show the widget
render(<AutocompleteBan/>, document.getElementById('widget-container'));

See an example in index.jsx.

Development

Rebuild the component every time the sources change :

npm run dev

Build the component :

npm run build

Run the integration test :

npm run dev
npm run test

About

Autocomplete input for french addresses

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published