Giter VIP home page Giter VIP logo

svelte-address-autocomplete's Introduction

Svelte Adress Autocomplete

npm version License: MIT Total alerts Language grade: JavaScript

Adress Autocomplete Component to Svelte

Installation

npm i svelte-address-autocomplete
// OR
yarn add svelte-address-autocomplete  

Note: to use this library in sapper, install as devDependency. See the link.

Demo Link

Checkout step 1

Local demo:

git clone https://github.com/JonasJs/svelte-address-autocomplete.git
cd svelte-address-autocomplete
yarn install && yarn start

Examples

An example of how to use the library:

Complex example Repl

Simple Example Repl

<script>
  import AdressAutocomplete from "svelte-address-autocomplete"
</script>
<div class="form">
  <h1>Svelte Adress Autocomplete</h1>
  <AdressAutocomplete className="newName" let:data let:onBlur>
    <label>Postal Code</label>
    <input type="text" on:blur="{onBlur}" />
    <h4>{data ? data.street : 'No address'}</h4>
  </AdressAutocomplete>
</div>
<style>
  label {
    margin-bottom: 8px;
  }
</style>

Properties

Component props:

Prop Type Description
className string Create a class to modify the component

Events

Prop Type Description
callback func callback with address information

Address Informations

{
  neighborhood,
  zipCode,
  complement,
  city,
  street,
  fu,
}

Slot Properties

Prop Type Description
data object Address Information
error any Request exception

NPM Statistics

Download stats for this NPM package

NPM

License

Svelte Adress Autocomplete is open source software licensed as MIT.

svelte-address-autocomplete's People

Contributors

andrelmlins avatar dependabot[bot] avatar jonasjs avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

svelte-address-autocomplete's Issues

Zip not found

Trying valid Spokane area zip codes. All result in error. Same on demo sites. Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.