---
id: examples
title: Examples and extensions
description: live demos showing how to use and extend docsearch beyond documentation-only use cases.
---
import { DocSearch } from '@docsearch/react';
import { DocSearchSidepanel } from '@docsearch/react/sidepanel';
import BrowserOnly from '@docusaurus/BrowserOnly';
import '@docsearch/css/dist/style.css';
import '@docsearch/css/dist/sidepanel.css';
> These examples are interactive. click a button to open the modal and try a query.
## Basic keyword search
Use the default experience with your index credentials. this works great for typical docs, blogs, and any site with a docsearch-compliant index.
```jsx
```
---
## Ask AI: ai-assisted answers
Add algolia askai to get synthesized answers grounded in your indexed content. you can scope the llm context using `searchParameters` like `facetFilters`, `filters`, `attributesToRetrieve`,`restrictSearchableAttributes`, and `distinct`.
```jsx
```
---
## Sidepanel: persistent AI chat
The sidepanel provides a persistent chat interface anchored to the side of the page, ideal for documentation sites where users want to ask follow-up questions without losing their place. Look for the button on the bottom right of the screen to try the demo.
```jsx
```
{() => (
)}
---
## Custom hit rendering (`hitComponent`)
Replace the default hit markup to match your brand and layout. below is a minimal example of a custom component.
```jsx
function CustomHit({ hit }) {
// render a compact, branded hit card
return (