All Projects → gragland → instatype

gragland / instatype

Licence: MIT license
⚡️ Mobile-friendly React autocomplete component

Programming Languages

javascript
184084 projects - #8 most used programming language
CSS
56736 projects

Projects that are alternatives of or similar to instatype

React Input Enhancements
Set of enhancements for input control
Stars: ✭ 1,375 (+2764.58%)
Mutual labels:  autocomplete, typeahead
Ng Select
⭐ Native angular select component
Stars: ✭ 2,781 (+5693.75%)
Mutual labels:  autocomplete, typeahead
React Autocomplete Hint
A React component for Autocomplete Hint.
Stars: ✭ 131 (+172.92%)
Mutual labels:  autocomplete, typeahead
Autosuggest Trie
Minimalistic trie implementation for autosuggest and autocomplete components
Stars: ✭ 22 (-54.17%)
Mutual labels:  autocomplete, typeahead
bootstrap-5-autocomplete
autocomplete/typeahead js plugin for bootstrap v5
Stars: ✭ 79 (+64.58%)
Mutual labels:  autocomplete, typeahead
Bootstrap 4 Autocomplete
A simple autocomplete/typeahead for Bootstrap 4 and jQuery
Stars: ✭ 36 (-25%)
Mutual labels:  autocomplete, typeahead
Autosuggest Highlight
Utilities for highlighting text in autosuggest and autocomplete components
Stars: ✭ 176 (+266.67%)
Mutual labels:  autocomplete, typeahead
Vue Autosuggest
🔍 Vue autosuggest component.
Stars: ✭ 492 (+925%)
Mutual labels:  autocomplete, typeahead
react-native-autocomplete-dropdown
Dropdown Item picker with search and autocomplete (typeahead) functionality for react native
Stars: ✭ 87 (+81.25%)
Mutual labels:  autocomplete, typeahead
react-power-select
A highly composable & reusable select/autocomplete components
Stars: ✭ 63 (+31.25%)
Mutual labels:  autocomplete, typeahead
React Autosuggest
WAI-ARIA compliant React autosuggest component
Stars: ✭ 5,773 (+11927.08%)
Mutual labels:  autocomplete, typeahead
react-thailand-address-typeahead
jquery.Thailand.js in React
Stars: ✭ 78 (+62.5%)
Mutual labels:  autocomplete, typeahead
Zsh Autocomplete
🤖 Real-time type-ahead completion for Zsh. Asynchronous find-as-you-type autocompletion.
Stars: ✭ 641 (+1235.42%)
Mutual labels:  autocomplete, typeahead
Autocomplete
🔮 Fast and full-featured autocomplete library
Stars: ✭ 1,268 (+2541.67%)
Mutual labels:  autocomplete, typeahead
Jquery Typeahead
Javascript Typeahead (autocomplete) plugin with more than 50 options and callbacks.
Stars: ✭ 527 (+997.92%)
Mutual labels:  autocomplete, typeahead
React Autowhatever
Accessible rendering layer for Autosuggest and Autocomplete components
Stars: ✭ 146 (+204.17%)
Mutual labels:  autocomplete, typeahead
Svelte Select
A select component for Svelte apps
Stars: ✭ 414 (+762.5%)
Mutual labels:  autocomplete, typeahead
Accessible Autocomplete
An autocomplete component, built to be accessible.
Stars: ✭ 474 (+887.5%)
Mutual labels:  autocomplete, typeahead
Autocomplete
Blazing fast and lightweight autocomplete widget without dependencies. Only 1KB gzipped. Demo:
Stars: ✭ 244 (+408.33%)
Mutual labels:  autocomplete, typeahead
indicium
🔎 A simple in-memory search for collections and key-value stores.
Stars: ✭ 41 (-14.58%)
Mutual labels:  autocomplete, typeahead

instatype

A mobile-friendly React autocomplete component

Demo

unsplash.now.sh (source)

Install

npm install instatype --save

Contribute

npm run example to run the example app with hot loading of instatype source for easy development.

Usage

import React from 'react';
import Instatype from 'instatype';

class Component extends React.Component {

  render() {
    return <Instatype requestHandler={myRequestHandler} selectedHandler={mySelectedHandler}/>;
  }
}

Props

Prop Description
placeholder Placeholder text for input
limit Number of results to show in dropdown
thumbStyle Set result images to "circle" or "square"
loadingIcon Path to custom loading icon
requestHandler Required function that fetches data, adds "image" and "name" properties to each object in the response array, and then passes data back to the instatype component. See an example requestHandler function below.
selectedHandler Required function that is called when a dropdown result is clicked. This will be passed the full object initially used to populate that result in the dropdown.

Example requestHandler

requestHandlerUsers: function(query, limit, callback){

  $.ajax({
    url: "https://api.instagram.com/v1/users/search",
    dataType: "jsonp",
    data: {
      client_id: this.props.instagramClientId,
      q: query,
      count: limit
    },
    success: function(data) {
      // Instatype expects an "image" and "name" for each result
      var renamedData = data.data.map(function(result){
        result.image = result.profile_picture;
        result.name = result.username;
        return result;
      });
      
      callback(renamedData);
    }
  });

}
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].