Loading

Search UI

Elastic Stack Serverless

Search UI is a JavaScript library for building modern, customizable search experiences using Elastic as a backend. Maintained by the Elastic team, it helps you implement search interfaces with minimal boilerplate.

As a headless library, Search UI separates logic from presentation. It provides search state and actions you can use with React, vanilla JavaScript, or other frameworks like Vue.

npm install @elastic/search-ui @elastic/react-search-ui @elastic/react-search-ui-views
# or
yarn add @elastic/search-ui @elastic/react-search-ui @elastic/react-search-ui-views
Note

Search UI can connect to Serverless using a backend proxy. In this setup, the frontend uses the ApiProxyConnector to send requests to your backend, which then forwards them to Elasticsearch. Direct browser connections to Serverless are not supported due to CORS restrictions.

See our guide for using Search UI in production for a full example of this setup.

Get started quickly with Search UI and your favorite Elastic product by following one of the tutorials below:

Guides for implementing ecommerce use cases using Search UI components.

  • Autocomplete: Add real-time query and product suggestions to your search box.
  • Product Carousels: Display horizontal lists of products, like 'Best Rated' or 'On Sale'.
  • Category Page: Filter and explore products in a specific category using facets.
  • Product Detail Page: Enrich product pages with cross-sell suggestions and related items.
  • Search Page: Show full search results with options for sorting, filters, and variants.

Quick-start guides for common Search UI tasks like styling, header placement, search behavior, and debugging.

Learn how to customize component behavior, build your own UI components, connect to any backend, and integrate Search UI with frameworks like Vue and Next.js.

Configuration, state, and actions that power the search experience.

React-specific utilities for accessing and interacting with the Core API.

Search UI includes a set of ready-to-use React components for building your search interface. This section documents each component's API and customization options.

Built-in connectors let Search UI talk to Elastic backends. This section documents how to configure each connector, including usage examples and integration details.

  • ⚠️ DEPRECATED Analytics Plugin: Track user behavior and send events to Elastic Behavioral Analytics.

Apache-2.0 © Elastic

Thank you to all the contributors! 🙏 🙏