# search-ui
**Repository Path**: ProjectOpenSea/search-ui
## Basic Information
- **Project Name**: search-ui
- **Description**: Search UI. Libraries for the fast development of modern, engaging search experiences.
- **Primary Language**: Unknown
- **License**: Apache-2.0
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2022-07-25
- **Last Updated**: 2025-06-21
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
> Libraries for the fast development of modern, engaging search experiences. :tada:
## Contents
- [About Search UI](#about-search-ui-rocket)
- [Getting started](#getting-started-)
- [Creating a search experience](#creating-a-search-experience)
- [FAQ](#faq-)
- [Contribute](#contribute-)
- [License](#license-)
---
## About Search UI :rocket:
A **[React](https://reactjs.org)** library that allows you to quickly implement search experiences without re-inventing the wheel.
Use it with [**Elastic App Search**](https://www.elastic.co/cloud/app-search-service?ultron=searchui-repo&blade=readme&hulk=product) or
[**Elastic Site Search**](https://www.elastic.co/cloud/site-search-service?ultron=searchui-repo&blade=readme&hulk=product) to have a
search experience up and running in minutes.
### Features :+1:
- **You know, for search** - Maintained by [Elastic](https://elastic.co), the team behind Elasticsearch.
- **Speedy Implementation** - Build a complete search experience with a few lines of code.
- **Customizable** - Tune the components, markup, styles, and behaviors to your liking.
- **Smart URLs** - Searches, paging, filtering, and more, are captured in the URL for direct result linking.
- **Headless** - Leverage our application logic, provide your own components or views.
- **Flexible front-end** - Not just for React. Use with any JavaScript library, even vanilla JavaScript.
- **Flexible back-end** - Not just for Elastic App Search. Use with any backend.
### Live Demo
Checkout the [live demo of Search UI](https://search-ui-stable.netlify.com).
[](https://codesandbox.io/s/national-parks-example-kdyms?fontsize=14)
## Getting started 🐣
Install **React Search UI** and the **App Search** connector.
```sh
# Install React Search UI and a Connector, like the Elastic App Search Connector
npm install --save @elastic/react-search-ui @elastic/search-ui-app-search-connector
```
## Creating a search experience
Use out of the box components, styles, and layouts to build a search experience in a matter of minutes.
```jsx
import React from "react";
import AppSearchAPIConnector from "@elastic/search-ui-app-search-connector";
import { SearchProvider, Results, SearchBox } from "@elastic/react-search-ui";
import { Layout } from "@elastic/react-search-ui-views";
import "@elastic/react-search-ui-views/lib/styles/styles.css";
const connector = new AppSearchAPIConnector({
searchKey: "search-371auk61r2bwqtdzocdgutmg",
engineName: "search-ui-examples",
hostIdentifier: "host-2376rb"
});
export default function App() {
return (
}
bodyContent={}
/>
);
}
```
Or go "headless", and take complete control over the look and feel of your search experience.
```jsx
({
searchTerm,
setSearchTerm,
results
})}
>
{({ searchTerm, setSearchTerm, results }) => {
return (
);
}}
```
A search experience built with Search UI is composed of the following layers:
1. [A Search API](#1-search-api)
2. [A Connector](#2-connectors)
3. [A SearchProvider](#3-searchprovider)
4. [Components](#4-components)
5. [Styles and Layout](#5-styles-and-layout)
```
Styles and Layout -> Components -> SearchProvider -> Connector -> Search API
```
---
### 1. Search API
A Search API is any API that you use to search data.
We recommend [**Elastic App Search**](https://www.elastic.co/cloud/app-search-service?ultron=searchui-repo&blade=readme&hulk=product).
It has Elasticsearch at its core, offering refined search UIs, robust documentation, and accessible dashboard tools.
You can start a [14 day trial of the managed service](https://www.elastic.co/cloud/app-search-service?ultron=searchui-repo&blade=readme&hulk=product) or [host the self managed package for free](https://www.elastic.co/downloads/app-search?ultron=searchui-repo&blade=readme&hulk=product).
Once your data is indexed into App Search or a similar service, you're good to go.
### 2. Connectors
A connector is a module that tell Search UI how to connect and communicate with your Search API.
It generates Search API calls for you so that Search UI will "just work", right out of the box.
```js
const connector = new AppSearchAPIConnector({
searchKey: "search-371auk61r2bwqtdzocdgutmg",
engineName: "search-ui-examples",
hostIdentifier: "host-2376rb"
});
```
_Read the [advanced README](./ADVANCED.md#build-your-own-connector) to learn how to build a connector for any Search API._
### 3. SearchProvider
`SearchProvider` is the top level component in your Search UI implementation.
It is where you configure your search experience and it ties all of your components together, so that they work as a cohesive application.
```jsx
{/* Place Components here! */}
```
While components can be handy, a search experience can have requirements that don't quite fit what components provide "out of the box". Use `WithSearch` to access "actions" and "state" in a [Render Prop](https://reactjs.org/docs/render-props.html), giving you maximum flexibility over the experience.
```jsx
({
searchTerm,
setSearchTerm
})}
>
{({ searchTerm, setSearchTerm }) => (
{/* Work directly with state and actions! */}
)}
```
_Read the [Advanced Configuration Guide](./ADVANCED.md#advanced-configuration) or learn more about the state management and the [Headless Core](./ADVANCED.md#headless-core)._
### 4. Components
Components are the building blocks from which you craft your search experience.
Each Component - like `SearchBox` and `Results` - is a child of the `SearchProvider` object:
```jsx