Skip to main content

Search

Result
Live Editor

With items

Result
Live Editor

With filters

Result
Live Editor

Analytics

The Search component is trackable through Kyber Analytics. This is the default analytics config.

export default {
value: 'Search',
actions: {
onSearchButtonClick: { type: 'SEARCH_BUTTON_CLICK', payload: 'Click' },
onChange: { type: 'SEARCH_CHANGE', payload: 'Change' },
onFilterChange: { type: 'SEARCH_FILTER_CHANGE', payload: 'Change' },
onSelectionChange: { type: 'SEARCH_SELECTION_CHANGE', payload: 'Change' },
},
};

Props

NameTypeDefault ValueRequiredDescription
analyticsanyNo
asstringNoRender the input as the provided element; should be either input or textarea.
autoCompletestringNo
bsPrefixstringNo
defaultItemsIterable<any>NoThe list of ComboBox items (uncontrolled).
defaultSelectedKeyKeyNoThe initial selected key in the collection (uncontrolled).
defaultValuestringNoThe default value of the input element (uncontrolled).
descriptionReactNodeNoA description for the field. Provides a hint such as specific requirements for what to choose.
disabledbooleanNo
disabledKeysIterable<Key>NoThe item keys that are disabled. These items cannot be selected, focused, or otherwise interacted with.
errorTextstringNo
filterOptionsIFilterOption[]No
filterTitleReact.ReactNodeNo
isInvalidbooleanNoWhether the input value is invalid.
isSelectBoxbooleanNoRenders a menu down arrow, opens the menu on click, and provides a clear button if a value has been typed or a key has been selected. @ignore
isValidbooleanNo
isWarningbooleanNoRender a warning around the input.
itemsIterable<any>NoThe list of ComboBox items (controlled).
keyKeyNo
labelReactNodeNoThe content to display as the label.
labelPropsDOMAttributes<FocusableElement>No
menuTriggerMenuTriggerAction'input'NoThe interaction required to display the ComboBox menu.
namestringNoThe name of the input element, used when submitting an HTML form. See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdefname).
onChange(value: string) => voidNo
onClearClick() => voidNoCallback fired when the clear button is clicked.
onFilterChange(value: string) => voidNo
onFocusChange(isFocused: boolean) => voidNoHandler that is called when the element's focus status changes.
onOpenChange(isOpen: boolean, menuTrigger?: MenuTriggerAction) => voidNoMethod that is called when the open state of the menu changes. Returns the new open state and the action that caused the opening of the menu.
onSearchButtonClick(value?: string) => voidNoCallback function that is fired when the search button is clicked.
onSelectionChange(key: Key) => voidNoHandler that is called when the selection changes.
radius"rounded" | "square" | "pill"No
readOnlybooleanNo
refRef<unknown>No
renderEndAddOn(() => Element) & (() => Element)NoRender a custom add-on at the end of the input.
renderPrefix(() => Element) & (() => Element)NoRender a custom prefix at the beginning of the input.
renderStartAddOn(() => Element) & (() => Element)NoRender a custom add-on at the beginning of the input.
renderSuffix(() => Element) & (() => Element)NoRender a custom suffix at the end of the input.
requiredbooleanNo
selectedKeyKeyNoThe currently selected key in the collection (controlled).
shouldFocusWrapbooleanNoWhether keyboard navigation is circular.
showClearButtonbooleanNoControls whether a clear button will be displayed when the input has a value.
showSearchTSearchButtonNoControls the display of the search icon, button, or button with text.
size"sm" | "lg"No
typestringNoThe type of the Input.
validate(value: ComboBoxValidationValue) => true | ValidationErrorNoA function that returns an error message if a given value is invalid. Validation errors are displayed to the user when the form is submitted if `validationBehavior="native"`. For realtime validation, use the `isInvalid` prop instead.
validationBehavior"aria" | "native"'aria'NoWhether to use native HTML form validation to prevent form submission when the value is missing or invalid, or mark the field as required or invalid via ARIA.
validTextstringNoShown when the field has been validated, isValid is true, and validText is provided.
valuestringNo
variant"primary" | "outline-secondary"NoControls the variant of the buttons. Only applies when showSearch is set to 'button' or 'button-with-text'.
warningTextstringNoShown when isWarning is true. This is not displayed as part of any validation state.
NameTypeDefault ValueRequiredDescription
aboutstringNo
accessKeystringNo
aria-activedescendantstringNoIdentifies the currently active element when DOM focus is on a composite widget, textbox, group, or application.
aria-atomicBooleanishNoIndicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute.
aria-autocomplete"list" | "none" | "inline" | "both"NoIndicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be presented if they are made.
aria-busyBooleanishNoIndicates an element is being modified and that assistive technologies MAY want to wait until the modifications are complete before exposing them to the user.
aria-checkedboolean | "true" | "false" | "mixed"NoIndicates the current "checked" state of checkboxes, radio buttons, and other widgets. @see aria-pressed @see aria-selected.
aria-colcountnumberNoDefines the total number of columns in a table, grid, or treegrid. @see aria-colindex.
aria-colindexnumberNoDefines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid. @see aria-colcount @see aria-colspan.
aria-colspannumberNoDefines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid. @see aria-colindex @see aria-rowspan.
aria-controlsstringNoIdentifies the element (or elements) whose contents or presence are controlled by the current element. @see aria-owns.
aria-currentboolean | "time" | "step" | "true" | "false" | "page" | "location" | "date"NoIndicates the element that represents the current item within a container or set of related elements.
aria-describedbystringNoIdentifies the element (or elements) that describes the object. @see aria-labelledby
aria-detailsstringNoIdentifies the element that provides a detailed, extended description for the object. Identifies the element (or elements) that provide a detailed, extended description for the object. @see aria-describedby.
aria-disabledBooleanishNoIndicates that the element is perceivable but disabled, so it is not editable or otherwise operable. @see aria-hidden @see aria-readonly.
aria-dropeffect"link" | "none" | "copy" | "execute" | "move" | "popup"NoIndicates what functions can be performed when a dragged object is released on the drop target. @deprecated in ARIA 1.1
aria-errormessagestringNoIdentifies the element that provides an error message for the object. @see aria-invalid @see aria-describedby.
aria-expandedBooleanishNoIndicates whether the element, or another grouping element it controls, is currently expanded or collapsed.
aria-flowtostringNoIdentifies the next element (or elements) in an alternate reading order of content which, at the user's discretion, allows assistive technology to override the general default of reading in document source order.
aria-grabbedBooleanishNoIndicates an element's "grabbed" state in a drag-and-drop operation. @deprecated in ARIA 1.1
aria-haspopupboolean | "dialog" | "menu" | "true" | "false" | "grid" | "listbox" | "tree"NoIndicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element.
aria-hiddenBooleanishNoIndicates whether the element is exposed to an accessibility API. @see aria-disabled.
aria-invalidboolean | "true" | "false" | "grammar" | "spelling"NoIndicates the entered value does not conform to the format expected by the application. @see aria-errormessage.
aria-keyshortcutsstringNoIndicates keyboard shortcuts that an author has implemented to activate or give focus to an element.
aria-labelstringNoDefines a string value that labels the current element. @see aria-labelledby.
aria-labelledbystringNoIdentifies the element (or elements) that labels the current element. @see aria-describedby.
aria-levelnumberNoDefines the hierarchical level of an element within a structure.
aria-live"off" | "assertive" | "polite"NoIndicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region.
aria-modalBooleanishNoIndicates whether an element is modal when displayed.
aria-multilineBooleanishNoIndicates whether a text box accepts multiple lines of input or only a single line.
aria-multiselectableBooleanishNoIndicates that the user may select more than one item from the current selectable descendants.
aria-orientation"horizontal" | "vertical"NoIndicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous.
aria-ownsstringNoIdentifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship between DOM elements where the DOM hierarchy cannot be used to represent the relationship. @see aria-controls.
aria-placeholderstringNoDefines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value. A hint could be a sample value or a brief description of the expected format.
aria-posinsetnumberNoDefines an element's number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM. @see aria-setsize.
aria-pressedboolean | "true" | "false" | "mixed"NoIndicates the current "pressed" state of toggle buttons. @see aria-checked @see aria-selected.
aria-readonlyBooleanishNoIndicates that the element is not editable, but is otherwise operable. @see aria-disabled.
aria-relevant"text" | "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals"NoIndicates what notifications the user agent will trigger when the accessibility tree within a live region is modified. @see aria-atomic.
aria-requiredBooleanishNoIndicates that user input is required on the element before a form may be submitted.
aria-roledescriptionstringNoDefines a human-readable, author-localized description for the role of an element.
aria-rowcountnumberNoDefines the total number of rows in a table, grid, or treegrid. @see aria-rowindex.
aria-rowindexnumberNoDefines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid. @see aria-rowcount @see aria-rowspan.
aria-rowspannumberNoDefines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid. @see aria-rowindex @see aria-colspan.
aria-selectedBooleanishNoIndicates the current "selected" state of various widgets. @see aria-checked @see aria-pressed.
aria-setsizenumberNoDefines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM. @see aria-posinset.
aria-sort"none" | "ascending" | "descending" | "other"NoIndicates if items in a table or grid are sorted in ascending or descending order.
aria-valuemaxnumberNoDefines the maximum allowed value for a range widget.
aria-valueminnumberNoDefines the minimum allowed value for a range widget.
aria-valuenownumberNoDefines the current value for a range widget. @see aria-valuetext.
aria-valuetextstringNoDefines the human readable text alternative of aria-valuenow for a range widget.
autoCapitalizestringNo
autoCorrectstringNo
autoSavestringNo
classNamestringNo
colorstringNo
contentEditableBooleanish | "inherit"No
contextMenustringNo
dangerouslySetInnerHTML{ __html: string; }No
datatypestringNo
defaultCheckedbooleanNo
dirstringNo
draggableBooleanishNo
hiddenbooleanNo
idstringNoThe element's unique identifier. See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id).
inlistanyNo
inputMode"text" | "none" | "search" | "tel" | "url" | "email" | "numeric" | "decimal"NoHints at the type of data that might be entered by the user while editing the element or its contents @see https://html.spec.whatwg.org/multipage/interaction.html#input-modalities:-the-inputmode-attribute
isstringNoSpecify that a standard HTML element should behave like a defined custom built-in element @see https://html.spec.whatwg.org/multipage/custom-elements.html#attr-is
itemIDstringNo
itemPropstringNo
itemRefstringNo
itemScopebooleanNo
itemTypestringNo
langstringNo
onAbortReactEventHandler<FormControlElement>No
onAbortCaptureReactEventHandler<FormControlElement>No
onAnimationEndAnimationEventHandler<FormControlElement>No
onAnimationEndCaptureAnimationEventHandler<FormControlElement>No
onAnimationIterationAnimationEventHandler<FormControlElement>No
onAnimationIterationCaptureAnimationEventHandler<FormControlElement>No
onAnimationStartAnimationEventHandler<FormControlElement>No
onAnimationStartCaptureAnimationEventHandler<FormControlElement>No
onAuxClickMouseEventHandler<FormControlElement>No
onAuxClickCaptureMouseEventHandler<FormControlElement>No
onBeforeInputFormEventHandler<FormControlElement>No
onBeforeInputCaptureFormEventHandler<FormControlElement>No
onBlurFocusEventHandler<FormControlElement> & ((e: FocusEvent<HTMLInputElement, Element>) => void)NoHandler that is called when the element loses focus.
onBlurCaptureFocusEventHandler<FormControlElement>No
onCanPlayReactEventHandler<FormControlElement>No
onCanPlayCaptureReactEventHandler<FormControlElement>No
onCanPlayThroughReactEventHandler<FormControlElement>No
onCanPlayThroughCaptureReactEventHandler<FormControlElement>No
onChangeCaptureFormEventHandler<FormControlElement>No
onClickMouseEventHandler<FormControlElement>No
onClickCaptureMouseEventHandler<FormControlElement>No
onCompositionEndCompositionEventHandler<FormControlElement>No
onCompositionEndCaptureCompositionEventHandler<FormControlElement>No
onCompositionStartCompositionEventHandler<FormControlElement>No
onCompositionStartCaptureCompositionEventHandler<FormControlElement>No
onCompositionUpdateCompositionEventHandler<FormControlElement>No
onCompositionUpdateCaptureCompositionEventHandler<FormControlElement>No
onContextMenuMouseEventHandler<FormControlElement>No
onContextMenuCaptureMouseEventHandler<FormControlElement>No
onCopyClipboardEventHandler<FormControlElement>No
onCopyCaptureClipboardEventHandler<FormControlElement>No
onCutClipboardEventHandler<FormControlElement>No
onCutCaptureClipboardEventHandler<FormControlElement>No
onDoubleClickMouseEventHandler<FormControlElement>No
onDoubleClickCaptureMouseEventHandler<FormControlElement>No
onDragDragEventHandler<FormControlElement>No
onDragCaptureDragEventHandler<FormControlElement>No
onDragEndDragEventHandler<FormControlElement>No
onDragEndCaptureDragEventHandler<FormControlElement>No
onDragEnterDragEventHandler<FormControlElement>No
onDragEnterCaptureDragEventHandler<FormControlElement>No
onDragExitDragEventHandler<FormControlElement>No
onDragExitCaptureDragEventHandler<FormControlElement>No
onDragLeaveDragEventHandler<FormControlElement>No
onDragLeaveCaptureDragEventHandler<FormControlElement>No
onDragOverDragEventHandler<FormControlElement>No
onDragOverCaptureDragEventHandler<FormControlElement>No
onDragStartDragEventHandler<FormControlElement>No
onDragStartCaptureDragEventHandler<FormControlElement>No
onDropDragEventHandler<FormControlElement>No
onDropCaptureDragEventHandler<FormControlElement>No
onDurationChangeReactEventHandler<FormControlElement>No
onDurationChangeCaptureReactEventHandler<FormControlElement>No
onEmptiedReactEventHandler<FormControlElement>No
onEmptiedCaptureReactEventHandler<FormControlElement>No
onEncryptedReactEventHandler<FormControlElement>No
onEncryptedCaptureReactEventHandler<FormControlElement>No
onEndedReactEventHandler<FormControlElement>No
onEndedCaptureReactEventHandler<FormControlElement>No
onErrorReactEventHandler<FormControlElement>No
onErrorCaptureReactEventHandler<FormControlElement>No
onFocusFocusEventHandler<FormControlElement> & ((e: FocusEvent<HTMLInputElement, Element>) => void)NoHandler that is called when the element receives focus.
onFocusCaptureFocusEventHandler<FormControlElement>No
onGotPointerCapturePointerEventHandler<FormControlElement>No
onGotPointerCaptureCapturePointerEventHandler<FormControlElement>No
onInputFormEventHandler<FormControlElement>No
onInputCaptureFormEventHandler<FormControlElement>No
onInvalidFormEventHandler<FormControlElement>No
onInvalidCaptureFormEventHandler<FormControlElement>No
onKeyDownKeyboardEventHandler<FormControlElement> & ((e: KeyboardEvent) => void)NoHandler that is called when a key is pressed.
onKeyDownCaptureKeyboardEventHandler<FormControlElement>No
onKeyPressKeyboardEventHandler<FormControlElement>No
onKeyPressCaptureKeyboardEventHandler<FormControlElement>No
onKeyUpKeyboardEventHandler<FormControlElement> & ((e: KeyboardEvent) => void)NoHandler that is called when a key is released.
onKeyUpCaptureKeyboardEventHandler<FormControlElement>No
onLoadReactEventHandler<FormControlElement>No
onLoadCaptureReactEventHandler<FormControlElement>No
onLoadedDataReactEventHandler<FormControlElement>No
onLoadedDataCaptureReactEventHandler<FormControlElement>No
onLoadedMetadataReactEventHandler<FormControlElement>No
onLoadedMetadataCaptureReactEventHandler<FormControlElement>No
onLoadStartReactEventHandler<FormControlElement>No
onLoadStartCaptureReactEventHandler<FormControlElement>No
onLostPointerCapturePointerEventHandler<FormControlElement>No
onLostPointerCaptureCapturePointerEventHandler<FormControlElement>No
onMouseDownMouseEventHandler<FormControlElement>No
onMouseDownCaptureMouseEventHandler<FormControlElement>No
onMouseEnterMouseEventHandler<FormControlElement>No
onMouseLeaveMouseEventHandler<FormControlElement>No
onMouseMoveMouseEventHandler<FormControlElement>No
onMouseMoveCaptureMouseEventHandler<FormControlElement>No
onMouseOutMouseEventHandler<FormControlElement>No
onMouseOutCaptureMouseEventHandler<FormControlElement>No
onMouseOverMouseEventHandler<FormControlElement>No
onMouseOverCaptureMouseEventHandler<FormControlElement>No
onMouseUpMouseEventHandler<FormControlElement>No
onMouseUpCaptureMouseEventHandler<FormControlElement>No
onPasteClipboardEventHandler<FormControlElement>No
onPasteCaptureClipboardEventHandler<FormControlElement>No
onPauseReactEventHandler<FormControlElement>No
onPauseCaptureReactEventHandler<FormControlElement>No
onPlayReactEventHandler<FormControlElement>No
onPlayCaptureReactEventHandler<FormControlElement>No
onPlayingReactEventHandler<FormControlElement>No
onPlayingCaptureReactEventHandler<FormControlElement>No
onPointerCancelPointerEventHandler<FormControlElement>No
onPointerCancelCapturePointerEventHandler<FormControlElement>No
onPointerDownPointerEventHandler<FormControlElement>No
onPointerDownCapturePointerEventHandler<FormControlElement>No
onPointerEnterPointerEventHandler<FormControlElement>No
onPointerEnterCapturePointerEventHandler<FormControlElement>No
onPointerLeavePointerEventHandler<FormControlElement>No
onPointerLeaveCapturePointerEventHandler<FormControlElement>No
onPointerMovePointerEventHandler<FormControlElement>No
onPointerMoveCapturePointerEventHandler<FormControlElement>No
onPointerOutPointerEventHandler<FormControlElement>No
onPointerOutCapturePointerEventHandler<FormControlElement>No
onPointerOverPointerEventHandler<FormControlElement>No
onPointerOverCapturePointerEventHandler<FormControlElement>No
onPointerUpPointerEventHandler<FormControlElement>No
onPointerUpCapturePointerEventHandler<FormControlElement>No
onProgressReactEventHandler<FormControlElement>No
onProgressCaptureReactEventHandler<FormControlElement>No
onRateChangeReactEventHandler<FormControlElement>No
onRateChangeCaptureReactEventHandler<FormControlElement>No
onResetFormEventHandler<FormControlElement>No
onResetCaptureFormEventHandler<FormControlElement>No
onScrollUIEventHandler<FormControlElement>No
onScrollCaptureUIEventHandler<FormControlElement>No
onSeekedReactEventHandler<FormControlElement>No
onSeekedCaptureReactEventHandler<FormControlElement>No
onSeekingReactEventHandler<FormControlElement>No
onSeekingCaptureReactEventHandler<FormControlElement>No
onSelectReactEventHandler<FormControlElement>No
onSelectCaptureReactEventHandler<FormControlElement>No
onStalledReactEventHandler<FormControlElement>No
onStalledCaptureReactEventHandler<FormControlElement>No
onSubmitFormEventHandler<FormControlElement>No
onSubmitCaptureFormEventHandler<FormControlElement>No
onSuspendReactEventHandler<FormControlElement>No
onSuspendCaptureReactEventHandler<FormControlElement>No
onTimeUpdateReactEventHandler<FormControlElement>No
onTimeUpdateCaptureReactEventHandler<FormControlElement>No
onTouchCancelTouchEventHandler<FormControlElement>No
onTouchCancelCaptureTouchEventHandler<FormControlElement>No
onTouchEndTouchEventHandler<FormControlElement>No
onTouchEndCaptureTouchEventHandler<FormControlElement>No
onTouchMoveTouchEventHandler<FormControlElement>No
onTouchMoveCaptureTouchEventHandler<FormControlElement>No
onTouchStartTouchEventHandler<FormControlElement>No
onTouchStartCaptureTouchEventHandler<FormControlElement>No
onTransitionEndTransitionEventHandler<FormControlElement>No
onTransitionEndCaptureTransitionEventHandler<FormControlElement>No
onVolumeChangeReactEventHandler<FormControlElement>No
onVolumeChangeCaptureReactEventHandler<FormControlElement>No
onWaitingReactEventHandler<FormControlElement>No
onWaitingCaptureReactEventHandler<FormControlElement>No
onWheelWheelEventHandler<FormControlElement>No
onWheelCaptureWheelEventHandler<FormControlElement>No
placeholderstringNoTemporary text that occupies the text input when it is empty.
prefixstringNo
propertystringNo
radioGroupstringNo
resourcestringNo
resultsnumberNo
roleAriaRoleNo
securitystringNo
slotstringNo
spellCheckBooleanishNo
styleCSSPropertiesNo
suppressContentEditableWarningbooleanNo
suppressHydrationWarningbooleanNo
tabIndexnumberNo
titlestringNo
translate"yes" | "no"No
typeofstringNo
unselectable"on" | "off"No
vocabstringNo