All Projects → zapkub → react-thailand-address-typeahead

zapkub / react-thailand-address-typeahead

Licence: other
jquery.Thailand.js in React

Projects that are alternatives of or similar to react-thailand-address-typeahead

vue-thailand-address
🇹🇭 Thai address input for Vue.
Stars: ✭ 44 (-43.59%)
Mutual labels:  autocomplete, address, typeahead
Autocomplete
🔮 Fast and full-featured autocomplete library
Stars: ✭ 1,268 (+1525.64%)
Mutual labels:  autocomplete, typeahead
Bootstrap 4 Autocomplete
A simple autocomplete/typeahead for Bootstrap 4 and jQuery
Stars: ✭ 36 (-53.85%)
Mutual labels:  autocomplete, typeahead
React Autowhatever
Accessible rendering layer for Autosuggest and Autocomplete components
Stars: ✭ 146 (+87.18%)
Mutual labels:  autocomplete, typeahead
Zsh Autocomplete
🤖 Real-time type-ahead completion for Zsh. Asynchronous find-as-you-type autocompletion.
Stars: ✭ 641 (+721.79%)
Mutual labels:  autocomplete, typeahead
React Autosuggest
WAI-ARIA compliant React autosuggest component
Stars: ✭ 5,773 (+7301.28%)
Mutual labels:  autocomplete, typeahead
React Autocomplete Hint
A React component for Autocomplete Hint.
Stars: ✭ 131 (+67.95%)
Mutual labels:  autocomplete, typeahead
Vue Autosuggest
🔍 Vue autosuggest component.
Stars: ✭ 492 (+530.77%)
Mutual labels:  autocomplete, typeahead
Ng Select
⭐ Native angular select component
Stars: ✭ 2,781 (+3465.38%)
Mutual labels:  autocomplete, typeahead
Autocomplete
Blazing fast and lightweight autocomplete widget without dependencies. Only 1KB gzipped. Demo:
Stars: ✭ 244 (+212.82%)
Mutual labels:  autocomplete, typeahead
react-power-select
A highly composable & reusable select/autocomplete components
Stars: ✭ 63 (-19.23%)
Mutual labels:  autocomplete, typeahead
indicium
🔎 A simple in-memory search for collections and key-value stores.
Stars: ✭ 41 (-47.44%)
Mutual labels:  autocomplete, typeahead
Jquery Typeahead
Javascript Typeahead (autocomplete) plugin with more than 50 options and callbacks.
Stars: ✭ 527 (+575.64%)
Mutual labels:  autocomplete, typeahead
Autosuggest Trie
Minimalistic trie implementation for autosuggest and autocomplete components
Stars: ✭ 22 (-71.79%)
Mutual labels:  autocomplete, typeahead
Jquery.thailand.js
ตัวช่วยกรอกที่อยู่ที่ดีที่สุดในไทย ไม่ต้องใช้ Server Side!
Stars: ✭ 490 (+528.21%)
Mutual labels:  autocomplete, address
React Input Enhancements
Set of enhancements for input control
Stars: ✭ 1,375 (+1662.82%)
Mutual labels:  autocomplete, typeahead
react-native-autocomplete-dropdown
Dropdown Item picker with search and autocomplete (typeahead) functionality for react native
Stars: ✭ 87 (+11.54%)
Mutual labels:  autocomplete, typeahead
Svelte Select
A select component for Svelte apps
Stars: ✭ 414 (+430.77%)
Mutual labels:  autocomplete, typeahead
Accessible Autocomplete
An autocomplete component, built to be accessible.
Stars: ✭ 474 (+507.69%)
Mutual labels:  autocomplete, typeahead
Autosuggest Highlight
Utilities for highlighting text in autosuggest and autocomplete components
Stars: ✭ 176 (+125.64%)
Mutual labels:  autocomplete, typeahead

react-thailand-address-typeahead

for v1.0 please refer to v1.0 branch

Work In Progress

Reimplementation of jquery Thailand in pure React focus on highly customizable rendering

Demo

Feature

  • Customizable layout
  • Fully customizable CSS
  • Custom datasource option (See Storybook Custom Option)
  • Keyboard navigation support
  • 🚧 datasource compression
  • 🚧 Lazy Loading address datasource
  • 🚧 Lazy Server Side datasource support
  • 🚧 Form validation support

Demo

Example with storybook

Installation

$ npm install react react-dom react-thailand-address-typeahead

or

$ yarn add react react-dom react-thailand-address-typeahead

Usage

see storybook link here https://zapkub.github.io/react-thailand-address-v2

import React from 'react'
import {
  ThailandAddressTypeahead,
  ThailandAddressValue,
} from "react-thailand-address-typeahead";
const App = () => {
  const [val, setVal] = React.useState<ThailandAddressValue>(
    ThailandAddressValue.fromDatasourceItem({
      d: "Khongteoy",
      p: "Bangkok",
      po: "10110",
      s: "Khongteoy",
    })
  );
  return (
    <ThailandAddressTypeahead
      value={val}
      onValueChange={(val) => setVal(val)}
      datasouce={customDatasource}
    >
      <ThailandAddressTypeahead.SubdistrictInput placeholder="Tumbon" />
      <ThailandAddressTypeahead.DistrictInput placeholder="Amphoe" />

      {/** you can put any customizable layout like below */}
      <div>
        <ThailandAddressTypeahead.ProvinceInput placeholder="Province" />
        <ThailandAddressTypeahead.PostalCodeInput placeholder="Postal Code" />
      </div>

      <ThailandAddressTypeahead.Suggestion />
      { /** or custom our own suggestion with CustomSuggestion */ }
    </ThailandAddressTypeahead>
  );
};

With Create React App

// App.js
import './App.css';
import { ThailandAddressTypeahead, ThailandAddressValue } from 'react-thailand-address-typeahead'
import { useState } from 'react';

function App() {
  const [val ,setVal] = useState(ThailandAddressValue.empty())
  return (
    <div className="App">
      <ThailandAddressTypeahead value={val} onValueChange={(val) => {
        setVal({...val})
      }}>
        <ThailandAddressTypeahead.PostalCodeInput />
        <ThailandAddressTypeahead.Suggestion />
      </ThailandAddressTypeahead>
    </div>
  );
}

export default App;

Stats for nerd 🤓

Original fork and idea

earthchie - Project Owner, Original fork (you should treat him a beer 😎🍺)

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].