Svelte Autocomplete screenshot

Svelte Autocomplete

Author Avatar Theme by Elcobvg
Updated: 16 Jan 2019
119 Stars

A lightweight typeahead / autocomplete component made with Svelte.js

Overview:

The Svelte Autocomplete is a lightweight typeahead / autocomplete component made with Svelte.js. It is easy to install and use, and has no dependencies. The component can handle asynchronous data and can work with both plain lists or key/value pairs.

Features:

  • No Dependencies: The Svelte Autocomplete component does not have any external dependencies, making it easy to integrate into your project.
  • Asynchronous Data Handling: It is capable of handling asynchronous data, making it ideal for use with APIs or dynamic content.
  • Support for Plain Lists or Key/Value Pairs: You can use the Svelte Autocomplete with either plain lists or key/value pairs, providing flexibility in data structure.

Installation:

To install the Svelte Autocomplete component, use the following command:

npm install svelte-autocomplete

Usage:

To use the Svelte Autocomplete component in your Svelte project, follow these steps:

  1. Import the component directly into your Svelte project.
  2. Use the component by including it in your code.
  3. Pass the required props such as name, class, items, isAsync, minChar, maxItems, and fromStart.
  4. Utilize the provided slots, such as the default slot for custom loading indication.

Summary:

The Svelte Autocomplete is a lightweight and versatile typeahead / autocomplete component made with Svelte.js. It has no dependencies and can handle asynchronous data. It supports both plain lists and key/value pairs, providing a flexible solution for autocomplete functionality.