chainlink-algolia-search
This package provides a search component that integrates with Algolia
indexes.
To install:
npm install chainlink-algolia-search
Invoke the component (and the styles):
import { SearchButton } from "chainlink-algolia-search";
import aCardImgBackground from "./assets/card-background.png";
import "chainlink-algolia-search/dist/index.css";
...
function App() {
return (
<>
<SearchButton
algoliaAppId="<your app ID here>"
algoliaPublicApiKey="<the public API key>"
categoryOrder={["Guide", "Video"]} // optional: priority list for showing the category filters
popularLinks={[ // optional: a list of popular links displayed on the default state modal
{ label: 'Example', url: 'https://example.com' },
]}
popularCards={[ // optional: a list of popular cards displayed on the default state modal (up to 2)
{ imgSrc: aCardImgBackground, label: 'Example', url: 'https://example.com' }
]}
/>
</>
);
}
export default App;