Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

org.webjars.npm:algolia__autocomplete-preset-algolia

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

org.webjars.npm:algolia__autocomplete-preset-algolia

WebJar for @algolia/autocomplete-preset-algolia

  • 1.9.2
  • Source
  • Maven
  • Socket score

Version published
Maintainers
1
Source
Autocomplete

A JavaScript library that lets you quickly build autocomplete experiences

Version MIT License

All you need to get started is:

  • A container to inject the experience into
  • Data to fill the autocomplete with
  • Any Virtual DOM solution (JavaScript, Preact, React, Vue, etc.)

The data that populates the autocomplete results are called sources. You can use whatever you want in your sources: a static set of searches terms, search results from an external source like an Algolia index, recent searches, and more.

By configuring just those two required parameters (container and getSources) you can have an interactive autocomplete experience. The library creates an input and provides the interactivity and accessibility attributes, but you're in full control of the DOM elements to output.

Screenshot

DocumentationAPIPlayground

Installation

The recommended way to get started is with the autocomplete-js package. It includes everything you need to render a JavaScript autocomplete experience.

Otherwise, you can install the autocomplete-core package if you want to build a renderer from scratch.

All Autocomplete packages are available on the npm registry.

yarn add @algolia/autocomplete-js
# or
npm install @algolia/autocomplete-js

If you don't use a package manager, you can use the HTML script element:

<script src="https://cdn.jsdelivr.net/npm/@algolia/autocomplete-js"></script>
<script>
  const { autocomplete } = window['@algolia/autocomplete-js'];
</script>

Usage

To get started, you need a container for your autocomplete to go in. If you don't have one already, you can insert one into your markup:

<div id="autocomplete"></div>

Then, insert your autocomplete into it by calling the autocomplete function and providing the container. It can be a CSS selector or an Element.

Make sure to provide a container (e.g., a div), not an input. Autocomplete generates a fully accessible search box for you.

import { autocomplete } from '@algolia/autocomplete-js';

autocomplete({
  container: '#autocomplete',
  // ...
});

Continue reading our Getting Started guide.

Documentation

The documentation offers a few ways to learn about the Autocomplete library:

  • Read the Core Concepts to learn more about underlying principles, like Sources and State.
  • Follow the Guides to understand how to build common UX patterns.
  • Refer to API reference for a comprehensive list of parameters and options.
  • Try out the Playground where you can fork a basic implementation and play around.

You can find more on the documentation.

Support

Packages

PackageDescriptionDocumentation
autocomplete-jsJavaScript package for AutocompleteDocumentation
autocomplete-coreJavaScript core primitives to build an autocomplete experienceDocumentation
autocomplete-plugin-recent-searchesA plugin to add recent searches to AutocompleteDocumentation
autocomplete-plugin-query-suggestionsA plugin to add query suggestions to AutocompleteDocumentation
autocomplete-plugin-algolia-insightsA plugin to add Algolia Insights to AutocompleteDocumentation
autocomplete-plugin-redirect-urlA plugin to enable redirect URLsDocumentation
autocomplete-plugin-tagsA plugin to manage and display a list of tags in AutocompleteDocumentation
autocomplete-preset-algoliaPresets to use Algolia features with AutocompleteDocumentation
autocomplete-theme-classicClassic theme for AutocompleteDocumentation

Showcase

See the awesome experiences people built with Autocomplete:

DocSearchAlgolia Documentation

Find more in our Showcase.

Sandboxes

Check out sandboxes using Autocomplete.

License

MIT

FAQs

Package last updated on 10 May 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc