For AI agents: the complete documentation index is available at https://wallarm.github.io/design-system/llms.txt, the full documentation bundle is available at https://wallarm.github.io/design-system/llms-full.txt, and this page is available as Markdown at https://wallarm.github.io/design-system/components/search-input.md.

SearchInput

A search field with a magnifying-glass icon and a clear button that appears once there is a value. Controlled only — pass value and onChange, and optionally onClear to react to the clear button specifically.

Source · Storybook

Usage

import { SearchInput } from '@wallarm-org/design-system/SearchInput';

Examples

With value

When the field has a value the clear button appears at the inline end. Clicking it fires onClear, then onChange('').

Custom placeholder

A custom placeholder when "Search" is not descriptive enough.

Disabled

Dimmed, with the clear button hidden even when a value is present — there is nothing the reader can act on.

Sizes

The same height scale as Input, so a search field lines up with the fields around it.

Props

PropTypeDefaultDescription
value *stringCurrent search value (controlled).
onChange *(value: string) => voidCalled when the value changes (typing or clearing).
onClear(() => void) | undefinedCalled when the clear button is clicked. Fires before onChange('').
sizeSearchInputSize | undefineddefaultInput size variant.
disabledboolean | undefinedfalse@default false
titlestring | undefined
patternstring | undefined
defaultCheckedboolean | undefined
defaultValuestring | number | readonly string[] | undefined
autoFocusboolean | undefined
idstring | undefined
tabIndexnumber | undefined
relstring | undefined
namestring | undefined
altstring | undefined
heightstring | number | undefined
srcstring | undefined
widthstring | number | undefined
autoCompleteHTMLInputAutoCompleteAttribute | undefined
maxLengthnumber | undefined
minLengthnumber | undefined
placeholderstring | undefinedSearch
readOnlyboolean | undefined
requiredboolean | undefined
checkedboolean | undefined
stepstring | number | undefined
acceptstring | undefined
maxstring | number | undefined
minstring | number | undefined
multipleboolean | undefined
data-testidstring | undefined