> ## Documentation Index
> Fetch the complete documentation index at: https://doc.lucidworks.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Search Bar

> Interactive search input with typeahead autocomplete suggestions in UI Studio applications

The Search Bar component in UI Studio provides a text input field for users to search for content. Use search bars to enable keyword searching with optional typeahead autocomplete that suggests results as users type. The component supports customizable placeholder text, styling, and configurable typeahead suggestions.

Pair the search bar component with the [results component](https://doc.lucidworks.com/docs/lw-platform/lw-ui-studio/components/results.md) and the [facets component](https://doc.lucidworks.com/docs/lw-platform/lw-ui-studio/components/facets.md) to build a complete search experience.

> [card] [UI Studio: Building the Search Entry Point](https://academy.lucidworks.com/training/019fd941-8756-78d5-a40e-7d39048b4572/overview)
>
> Learn how to configure the Search Bar component with Typeahead, map it to a Fusion query profile, and customize its placeholder text and styling.

## Basic usage

Add a search bar component to your UI Studio page to enable search capability. To build a minimal search component, you must set values for the Name and Datastore fields.

![](https://mintcdn.com/lucidworks/qwknCXYlTmFH7Hq2/assets/images/lw-platform/ui-studio/add-search.png?fit=max\&auto=format\&n=qwknCXYlTmFH7Hq2\&q=85\&s=fc5a1d5e154f2f733cabaa59c424e038)

Search Bar component dropped into the header section

Users type queries and press Enter to search.

> [card] [UI Studio: Data Integration & Customization](https://academy.lucidworks.com/training/019fd952-23b7-7190-8343-71c7d3ea6850/overview)
>
> Learn how to link UI Studio components to Fusion datastores for live data, then use preview mode to validate the experience.

## Typeahead

You can enable autocomplete suggestions that appear as users type. When typeahead is enabled, the search bar displays a dropdown of suggested queries as users type. Users can:

* Click a suggestion to search for it.
* Use arrow keys to navigate suggestions.
* Press Enter to search the highlighted suggestion.
* Press Escape to close the dropdown.

To configure typeahead, you must have a configured typeahead datasource. This datasource can be the same as your primary datasource for search. If the endpoint is missing or unreachable, UI Studio automatically deactivates typeahead to prevent errors.

> [!NOTE]
>
> Typeahead suggestions improve discoverability and reduce typos, but they also add complexity. Turn the typeahead setting off for simple search scenarios or when your dataset is small.

Expand the **Typeahead** section to configure autocomplete behavior and appearance.

### Suggestion count

Set the maximum number of typeahead suggestions to display in the **Suggestion Count** field.

Enter a number in the **Suggestion Count** field, for example, 5, 10, or 15.

The default value is 10 suggestions. Keep suggestion counts between 5 and 10 to balance performance and suggestion variety. Too few suggestions limit discovery, while too many suggestions can overwhelm users.

### Search character count

Set the minimum number of characters required before showing suggestions. Enter a number in the **Search Character Count** field, for example, 2, 3, or 4.

Setting a higher number prevents typeahead from triggering on very short queries that would return too many broad suggestions. If you have a dataset with distinct terms, use a lower value.

> [!NOTE]
>
> Higher character counts reduce the number of typeahead API calls, improving performance. However, higher character counts also delay when users see useful suggestions.

## Configuration properties

**Name** `string` *required*

Component identifier for organization and reference. The name does not display on your user-facing website.

**Datastore** `dropdown` *required*

Primary data source for search queries. Must be configured in your UI Studio application.

**Typeahead Datastore** `dropdown`

Data source for autocomplete suggestions. This datastore can be the same as the main datastore or a separate optimized source. If the endpoint is missing or unreachable, typeahead is automatically deactivated to prevent errors.

**Placeholder Text** `string` (default: Search anything...)

Hint text displayed when the search bar is empty. Should be concise and descriptive.

**Placeholder Text Style** `group`

Typography settings for placeholder text.

**Properties**

**Font Family** `dropdown` (default: Public Sans)

Font family for placeholder text.

**Font Weight** `dropdown` (default: Regular)

Font weight for placeholder text.

**Options**

**Regular** `option`

Standard weight.

**Bold** `option`

Heavy weight.

**Font Size** `number` (default: 14)

Font size in pixels for placeholder text.

**Colors** `group`

Color scheme for the search bar.

**Properties**

**Search Bar** `color` (default: #F5F8FA)

Background color for the search input field.

**default** `#F5F8FA`

**Placeholder Text** `color` (default: #999999)

Text color for placeholder text. Should be lighter than entered text for clear distinction.

**default** `#999999`

**Typeahead** `group`

Autocomplete suggestion settings.

**Properties**

**Enabled** `boolean` (default: true)

When enabled, displays autocomplete suggestions as users type. Typeahead is enabled by default but requires a configured Typeahead datastore. This datastore can be the same as your search datastore. If no datastore is configured, typeahead is automatically deactivated.

**Suggestion Count** `number` (default: 10)

Maximum number of autocomplete suggestions to display.

Recommended range: 5 to 10

**Search Character Count** `number` (default: 3)

Minimum number of characters required before showing typeahead suggestions.

Recommended range: 2 to 5

**Dropdown Background** `color` (default: #ffffff)

Background color for the suggestions dropdown.

**default** `#ffffff`

**Item Hover Background** `color` (default: #F5F8FA)

Background color when hovering over a suggestion.

**default** `#F5F8FA`

**Item Selected Background** `color` (default: #F5F8FA)

Background color for keyboard-selected suggestions.

**default** `#F5F8FA`

**Item Active Background** `color` (default: #F5F5F5)

Background color for actively selected items.

**default** `#F5F5F5`

**Item Text Color** `color` (default: #2C3136)

Text color for suggestion items.

**default** `#2C3136`

**Font Family** `dropdown` (default: Public Sans)

Font family for typeahead suggestion text.

**Font Weight** `dropdown` (default: Regular)

Font weight for typeahead suggestion text.

**Font Size** `number` (default: 14)

Font size in pixels for typeahead suggestion text.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.