# Search Bar

* **Component**: \<Search/>
* **Path**: /components/home/search.tsx
* **Import**:

```typescript
import { Search } from "@/components/home/search";
```

<figure><img src="/files/Gvdpv5DyVnbmtcsBH0dQ" alt=""><figcaption><p>Search Bar</p></figcaption></figure>

A basic search input controlled by a `useState` (`searchTerm` and `setSearchTerm`) so you can re-use it wherever you need it.

{% hint style="info" %}
By default, this search bar is only used on `components/main-layout.tsx`, check this file  if you want to see an example.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.directoryfa.st/directory-components/search-bar.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
