Skip to main content
Version: Stable (v4.x)

Get started with Sidepanel

warning
Ask AI is being migrated from a standalone DocSearch feature into Algolia's Agent Studio. DocSearch v5 will fully support Agent Studio and transition to using it. A more detailed migration guide will be published before the DocSearch v5 release.
info

Sidepanel is available from version >= 4.4

Introduction

DocSearch Sidepanel is a new experience separate from the DocSearch Modal experience. Sidepanel is built entirely for usage with Ask AI and can be used completely standalone or in Hybrid mode with the Modal.

Installation

To get started with Sidepanel, first you will need to install the needed packages:

npm install @docsearch/react @docsearch/css

# Or if using JS based package

npm install @docsearch/sidepanel-js @docsearch/css

Or using your package manager of choice

Without package manager

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@docsearch/css/dist/style.css" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@docsearch/css/dist/sidepanel.css" />

<script src="https://cdn.jsdelivr.net/npm/@docsearch/sidepanel-js"></script>

Implementation

The simplest implementation of Sidepanel would be as follows:

import { DocSearchSidepanel } from '@docsearch/react/sidepanel';

import '@docsearch/css/dist/style.css';
import '@docsearch/css/dist/sidepanel.css';

function App() {
return (
<DocSearchSidepanel
appId='YOUR_APP_ID'
apiKey='YOUR_SEARCH_API_KEY'
assistantId='YOUR_ASSISTANT_ID'
indexName='YOUR_INDEX_NAME'
/>
);
}

This is just the most basic form of implementation. To learn about other implementation methods, you can read our Advanced use cases.

To learn more about the different configuration options for Sidepanel, you can read our Sidepanel API References.