aFarkas/remote-list is a JavaScript project with 54 stars. super lightweight autocomplete
Snapshot summary built from the project's own GitHub metadata — there's no written TopGit review yet. The page will update automatically when a full review is published.
WHY NO REVIEW YET
TopGit writes full reviews for the most-starred, most-requested repositories. This page is a snapshot until then — see the READ ME tab for the original README in full.
An ultra lightweight autosuggest / autocomplete plugin
An ultra lightweight autocomplete / autosuggest plugin with a simple but powerful API. Leverages the HTML5 datalist element to build an extreme lightweight autosuggest plugin. Can use webshim to polyfill old browsers or enhance modern ones.
extreme lightweight (~1.5kb compressed/gzipped)
simple, intuitive API
includes powerful caching
performs server friendly AJAX requests (no multiple requests at once, no requests for older value hints)
allows customized rich markup content (not only value and label) *
allows different filtering or other behavior customization *
The options can be set using the jQuery.fn.remoteList() method or by using the data-remote-list attribute on the given element.
The $.fn.remoteList plugin has the following options:
minLength
maxLength
param
source
select
renderItem
Examples:
$('input.autosuggest').remoteList({
minLength: 4,
source: "my-ajax-service.json"
});
//or
<input data-remote-list='{"minLength": 4, "source": "my-ajax-service.json"}' class="autosuggest" type="search" />
//in case the data-remote-list is not a JSON object, but a simple string, it is considered as the `source` option
<input data-remote-list="my-ajax-service.json" class="autosuggest" type="search" />
minLength: (Number default: 2)
The minimum number of characters a user must type before a search is performed. Zero is useful for local data with just a few items, but a higher value should be used when a single character search could match a few thousand items.
The maximum number of characters a new search should be tried. Otherwise the data from cache is used. If the user copies more characters at once into the input field and there is no cached data, the string will be shortened and then requested.
In case of static data this number should be set to 0 so a search is only done once.
The name of the query parameter used for AJAX service.
<input name="q" data-remote-list='{"source": "get-data.json", "param": "term"}' />
<!-- use the query name 'term' instead of 'q' -->
source: (mixed: String or Function)
The data source for the suggestions. The data will requested with each user input as long as the user input satisfies the minLength and the maxLength option.
String: When a string is used, the plugin expects that string to point to a URL resource that will return JSON (or JSONP) data.
Function: The function callback offers much flexibility. It serves as a simple data provider. And should be used, if the request or response has to be modified.
The function receives the following arguments:
value: The value the suggestions should be based on
response: A callback function which expects a single argument: the data to suggest to the user.
reset/fail: A callback function, which should be invoked, if the data couldn't be retrieved
request: An object with a single property with name of param and the value.
source: Either the source url or the function itself.
The data provided by the either the source URL or the source function should be either an array of strings representing the values or an array of objects with the key value and an optional label key.
select: (Function)
A callback function, which is invoked, if the user selects an item of the suggestion list. The selected item can be retrieved with the method selectedOption and the selected data can be retrieved with method selectedData.
All methods can be invoked by passing the method name as a string to the $.fn.remoteList plugin. Additional parameters are passed as an array as the second parameter:
Returns the first option element in the datalist, which has the same value, than the associated input element. If no option is found, it will return null. Normally this method is used in a listselect event listener or the select callback function.
var option = $('.autosuggest').remoteList('selectedOption');
selectedData
Returns data associated with the selectedOption. If no option/data is found, it will return null. Normally this method is used in a listselect event listener or the select callback function.
var data = $('.autosuggest').remoteList('selectedData');
Builds a new suggestion list for the given searchValue, if minLength and maxLength options are met. The searchValue parameter has to be wrapped into an array.
TopGit's last sync did not record any GitHub topics for aFarkas/remote-list. GitHub topics appear in the right sidebar of a repository page; that's the authoritative place to check.
How active is development on aFarkas/remote-list?
The most recent commit recorded on aFarkas/remote-list was 11.0 years ago, based on the GitHub push timestamp. The repository has 13 forks — one of the better signals of community interest.
How many stars does aFarkas/remote-list have?
aFarkas/remote-list has 54 GitHub stars — refresh the page for the live number, or check github.com/aFarkas/remote-list. TopGit mirrors GitHub's count but does not claim minute-by-minute accuracy.
What language is aFarkas/remote-list written in?
aFarkas/remote-list is written primarily in JavaScript. GitHub's language field is based on the largest share of bytes in the default branch.
Where do I read more about aFarkas/remote-list?
This TopGit page is a snapshot — the READ ME tab shows the project's own README content (links stripped, images preserved). The GitHub repository at github.com/aFarkas/remote-list is the definitive source.
Read full README in the tab above.
Is remote-list worth your time?
ChatGPT, Claude and Perplexity can all read this page. Ask one of them what it makes of remote-list.