Skip to content

searchcraft-input-form

This web component provides a user-friendly interface for querying an indexed dataset, enabling users to easily search large collections of data. It abstracts the complexities of index-based searching, making it accessible to users of all technical levels.

import { SearchcraftInputForm } from "@searchcraft/react-sdk";
<searchcraft-input-form auto-search />
PropertyAttributeDescriptionTypeDefault
autoSearchauto-searchWhether or not to automatically submit the search term when the input changes.boolean | undefinedtrue
buttonLabelbutton-labelThe label for the submit button.string | undefinedundefined
buttonPlacementbutton-placementWhere to place the search button."left" | "none" | "right" | undefined'none'
inputLabelinput-labelThe label rendered above the input.string | undefinedundefined
placeholderBehaviorplaceholder-behaviorThe placeholder’s render behavior. ‘hide-on-focus’ - Hide the placeholder text immediately when the input form gains focus. ‘hide-on-text-entered’ - Only hide the placeholder when the input form has text entered into it."hide-on-focus" | "hide-on-text-entered" | undefinedundefined
placeholderValueplaceholder-valueThe input element’s placeholder value.string | undefined'Enter Search'
searchcraftIdsearchcraft-idThe id of the Searchcraft instance that this component should use.string | undefinedundefined
EventDescriptionType
inputBlurWhen the input becomes unfocused.CustomEvent<void>
inputFocusWhen the input becomes focused.CustomEvent<void>
inputInitEvent emitted when input initializes.CustomEvent<void>