Skip to content

searchcraft-popover-form

This web component is designed to display search results in a popover container that dynamically appears when the user interacts with a search input field, or when a popover-button is pressed.

import { SearchcraftPopoverForm } from "@searchcraft/react-sdk";
index.html
<searchcraft-popover-form type="inline" />
index.js
const popoverForm = document.querySelector('searchcraft-popover-form');
popoverForm.popoverResultMappings = {};
PropertyAttributeDescriptionTypeDefault
hotkeyhotkeyThe hotkey that activates the popover.string | undefined'k'
hotkeyModifierhotkey-modifierThe hotkey modifier that activates the popover. Used together with the hotkey prop."alt" | "ctrl" | "meta" | "option" | undefined'meta'
popoverResultMappingsFormats the content rendered for each result.undefined | { title?: SearchResultMapping | undefined; subtitle?: SearchResultMapping | undefined; imageSource?: SearchResultMapping | undefined; imageAlt?: SearchResultMapping | undefined; href?: SearchResultMapping | undefined; }undefined
searchcraftIdsearchcraft-idThe id of the Searchcraft instance that this component should use.string | undefinedundefined
typetypeThe type of popover form to render. - inline - Renders inline with the rest of the content on the page. The search results pop over the page content. - fullscreen - Renders in fullscreen view. Used together with the searchcraft-popover-button component. - modal - Renders in a modal view. Used together with the searchcraft-popover-button component."fullscreen" | "inline" | "modal" | undefined'inline'