> ## 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:typeahead

[localhost link]: http://localhost:3000/docs/5/app-studio/reference/tags/lightning.directive.searchTypeahead

[mintlify link]: https://doc.lucidworks.com/docs/5/app-studio/reference/tags/lightning.directive.searchTypeahead

[old doc.lw link]: https://doc.lucidworks.com/app-studio/4.2/1104.md

> [card] Key questions to get you started
>
> Powered by Lucidworks Agent Studio

## Description

Creates a typeahead style search box that can be customized to allow the
user to add filters using the
[search keyword tag](https://doc.lucidworks.com/docs/4/app-studio/reference/tags/lightning.directive.searchKeyword.md). You can
also include the [instant result list tag](https://doc.lucidworks.com/docs/4/app-studio/reference/tags/lightning.directive.instantResultList.md) to allow the user to select a result based on the
search query and filters.

## Usage

as element:

```xml wrap  theme={"dark"}
<search:typeahead
       platform="{string}"
       [auto-search="{string}"]
       [action="{string}"]>
</search:typeahead>
```

#### Parameters

| Param | Type | Details |
| - | - | - |
| platform | **string** | The name of the platform to use to search for matching keyword values |
| auto-search  *(optional)* | **string** | Milliseconds to wait after the search is automatically submitted |
| action  *(optional)* | **string** | The page to send the search query to |

## Example

#### Source

```xml wrap  theme={"dark"}
<search:typeahead platform="platform" datepicker-min-view="year" action="laureates" class="searchbox">
    <search:keyword keyword="country" facet="Country of affiliation" description="Country of affiliation"></search:keyword>
    <search:keyword keyword="gender" facet="gender" description="laureate's gender"></search:keyword>
    <search:keyword keyword="category" facet="Prize Category" description="Award category"></search:keyword>
    <search:keyword keyword="before" facet="year" date="before" description="Awarded before this year" date-format="yyyy" date-display-format="yyyy"></search:keyword>
    <search:keyword keyword="after" facet="year" date="after" description="Awarded after this year" date-format="yyyy" date-display-format="yyyy"></search:keyword>
    <search:keyword keyword="year" facet="year" date="on" description="Awarded in this year" date-format="yyyy" date-display-format="yyyy"></search:keyword>
    <instant:result-list platform="platform">
        <search:result>
            <search:field name="full_name" label="" styling="label-inline" url="/#/laureates/{{result.fields.id.val | actualValue}}"></search:field>
            <search:field name="Prize Category" label="" styling="label-inline" class="pill"></search:field>
        </search:result>
    </instant:result-list>
</search:typeahead>
```

#### Result

![Result](https://mintcdn.com/lucidworks/ENcE8K39c0iEpL8J/assets/images/app-studio/as-examples/tags/searchTypeahead.png?fit=max\&auto=format\&n=ENcE8K39c0iEpL8J\&q=85\&s=5ac70c9f46c775fe086ff00f1862a149)


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