Skip to main content
Autocomplete is also available as an experimental widget in InstantSearch, making it easier to integrate into your search experience. For more information, see the API reference for InstantSearch.js or React InstantSearch.
The theme is a neutral and clean starter. You can use it as a base and customize it with CSS variables. If you want to build your own theme, you can start from the Classic theme and adjust it.

Installation

First, you need to install the theme.
Then import it in your project:
JavaScript
If you don’t use a package manager, you can link the style sheet in your HTML:
HTML

CSS variables

The theme uses CSS variables that you can customize in your own CSS.
All colors are defined with two variables: one for the RGB values and one for the alpha layer. This lets you adjust each value independently.

Size and spacing

Z-index

Font

Icons

Text colors

Border colors

Background colors

Detached mode

Shadows

Scrollbar

To customize a value, you can create a custom style sheet and override the variable.
CSS
Make sure to load these styles after the theme.

Templates

For the theme to work out of the box, you need to use a conventional CSS class set. All class names from the theme come with an aa- namespace to avoid interfering with your own styles.

Item

Here’s the markup for an item template.
To wrap an item within a link, use the .aa-ItemLink class in place of the element with .aa-ItemWrapper. Make sure not to use both together.
Here’s the markup for a header template.

No results

Here’s the markup for a noResults template.
JavaScript

Additional CSS classes

The theme provides a set of optional classes for you to use in different contexts.

Modifiers

  • .aa-ItemIcon--noBorder removes the border of the icon
  • .aa-ItemIcon--alignTop aligns the icon to the top (recommended when the template is longer than three lines)
  • .aa-ItemIcon--picture makes the icon larger (recommended when using an image and the template is longer than three lines)
  • .aa-Panel--scrollable declares the scrollable containers of the panel

Utilities

  • .aa-ActiveOnly displays an element only when the item is active
  • .aa-DesktopOnly displays an element only on desktop devices
  • .aa-TouchOnly displays an element only on tap devices

Dark mode

The theme supports dark mode. You can enable it on the body tag in two different ways:
  • <body data-theme="dark" />
  • <body class="dark" />
Last modified on June 19, 2026