1
0
Fork 0
docsearch/examples/demo-react/src/examples/basic.tsx
Paul Jankowski ef2bec0e20
feat: Facet filters for search (#2899)
* feat(v5): Initial facet filters work

* Perf updates, dark theme, facet chips, a11y improvements

* fix: bump css bundle size limit

* Dedupe facet filters, refetch facets on searchParameters changes

* Add chevron flourish
2026-06-16 16:38:18 -04:00

23 lines
663 B
TypeScript

/* eslint-disable react/react-in-jsx-scope */
import { DocSearch } from '@docsearch/react';
import type { JSX } from 'react';
import type { DemoTheme } from '../App';
export default function Basic({ theme }: { theme: DemoTheme }): JSX.Element {
return (
<DocSearch
indexName="docsearch"
appId="PMZUYBQDAK"
apiKey="24b09689d5b4223813d9b8e48563c8f6"
translations={{ button: { buttonText: 'Keyword search' } }}
insights={true}
theme={theme}
facets={[
{ key: 'language', label: 'Language' },
{ key: 'version', label: 'Version' },
{ key: 'type', label: 'Content type' },
]}
/>
);
}