Skip to components
DEVELOPER REFERENCE

SearchActionBar API

Props, callbacks and methods. Select an underlined type to explore its fields, allowed values and callback arguments.

SearchActionBar16 props2 callbacks0 methods

Preset and CSS

Set preset.className to attach your CSS class to the component's rendered surface. Explicit component props take precedence over preset options.

Preset options disabled readOnly hideIcon type

CSS parts in the example [data-part="icon"] [data-part="input"] [data-part="root"] [data-part="shortcut"]

Use styles.root and styles.parts in a theme and generate a CSS file with themeToCss. For other JSON-friendly component props, spread presetProps(preset) before explicit props. Parts and states depend on configuration; the gallery shows those visible in the current preview.

Props16

SearchActionBar props
NameTypeDescription
actionsOptional
ComponentChildrenInspect type
Actions rendered by this component, or action-label overrides for editor fields; expand the declared type.
classNameOptionalstring | undefinedAdditional CSS classes applied to the component root.
presetOptional
SearchInputPreset | undefinedInspect type
Reusable component appearance and option defaults. Explicit component props take precedence.
valueOptionalstring | undefinedValue to display or edit. The declared type identifies the supported representation; change callbacks describe how edited values are emitted.
inputRefOptional
SearchInputRef<HTMLInputElement> | undefinedInspect type
Reference or callback receiving the underlying input element.
rootClassNameOptionalstring | undefinedAdditional CSS classes for the root part of the component.
inputClassNameOptionalstring | undefinedAdditional CSS classes for the input part of the component.
iconClassNameOptionalstring | undefinedAdditional CSS classes for the icon part of the component.
shortcutClassNameOptionalstring | undefinedAdditional CSS classes for the shortcut part of the component.
shortcutOptionalanyKeyboard shortcut hint displayed beside the search field.
iconOptionalanyIcon content for the component. When the type is string, supply trusted SVG markup.
leadingOptionalanyContent rendered before the search input.
hideIconOptionalboolean | undefinedHides the default search icon.
trailingOptionalanyContent rendered after the search input.
testIdOptionalstring | undefinedStable data attribute for locating the control in automated tests.
typeOptional"text" | "search" | undefinedNative input behavior: search or plain text.

Events and callbacks2

SearchActionBar events and callbacks
NameTypeDescription
onValueChangeOptional
((value: string, event: SearchInputEvent<HTMLInputElement>) => void) | undefinedInspect type
Receives the updated input value. Store it in application state and pass it back through value.
onInputOptional
((event: SearchInputEvent<HTMLInputElement>) => void) | undefinedInspect type
Handles native input events as the user edits the field.

Methods0

No component-specific imperative methods. Use props and callbacks to control this component.

Inherited HTML props and events345