Simple Svelte Autocomplete screenshot

Simple Svelte Autocomplete

Author Avatar Theme by Pstanoev
Updated: 25 Jul 2023
472 Stars

Simple Autocomplete / typeahead component for Svelte

Categories

Overview

The Simple Svelte Autocomplete is a versatile Autocomplete / Select / Typeahead component built with Svelte. It offers a live demo for easy testing and requires no external dependencies. With this component, users can use plain lists or arrays of objects for autocompletion, and have the option to define a label field or function. Additionally, it supports searching by custom fields and can handle the asynchronous loading of items.

Features

  • No dependencies
  • Use plain lists or arrays of objects
  • Option to define a label field or function
  • Option to define more fields used for search
  • Support for asynchronous load of items
  • Can hold one or several values

Installation

To install the Simple Svelte Autocomplete component, follow the steps below:

  1. Import the component:
import Autocomplete from 'simple-svelte-autocomplete';
  1. Define the items:
const items = ['Apple', 'Banana', 'Orange'];
  1. Use the component:
<Autocomplete {items} />

Summary

The Simple Svelte Autocomplete is a powerful autocomplete/select/typeahead component made with Svelte. It offers various features such as the ability to define labels, search by custom fields, and handle asynchronous loading of items. With its simple installation and versatile functionality, it provides a convenient solution for implementing autocompletion in Svelte projects.