1
0
Fork 0
docsearch/packages/docsearch-sidepanel-js
Paul Jankowski a8fecaaad6
fix(v5): expose Sidepanel search parameter types (#2956)
* fix(v5): expose Sidepanel search parameter types

Backport of #2906.\n\nOriginal commit: 4710d0ca77

* Delete sidepanel.test.ts

Had a pointless test case in it.

---------

Co-authored-by: Divyansh Singh <40380293+brc-dd@users.noreply.github.com>
2026-08-05 12:15:03 -04:00
..
src fix(v5): expose Sidepanel search parameter types (#2956) 2026-08-05 12:15:03 -04:00
CHANGELOG.md chore: release v5.0.0-beta.2 (#2950) 2026-08-04 14:39:25 -04:00
package.json chore: release v5.0.0-beta.2 (#2950) 2026-08-04 14:39:25 -04:00
README.md chore: migrate to from yarn, lerna and shipjs to bun & changesets (#2827) 2026-03-02 18:52:01 +01:00
tsdown.config.mts chore(tsdown): Bump to latest tsdown version (#2918) 2026-07-15 09:25:43 -04:00

@docsearch/sidepanel-js

JavaScript package for DocSearch Sidepanel, a standalone Ask AI chat panel.

Installation

npm install @docsearch/sidepanel-js

Get started

If you dont want to use a package manager, you can use a standalone endpoint:

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

To get started, you need a container for your DocSearch Sidepanel component to go in. If you dont have one already, you can insert one into your markup:

<div id="docsearch-sidepanel"></div>

Then, insert DocSearch Sidepanel into it by calling the sidepanel function and providing the container. It can be a CSS selector or an Element.

Make sure to provide a container (for example, a div).

import sidepanel from '@docsearch/sidepanel-js';

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

sidepanel({
  container: '#docsearch-sidepanel',
  indexName: 'YOUR_INDEX_NAME',
  appId: 'YOUR_APP_ID',
  apiKey: 'YOUR_SEARCH_API_KEY',
  assistantId: 'YOUR_ASSISTANT_ID',
});

Documentation

Read documentation →