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
| Name | Type | Description |
|---|---|---|
actionsOptional |
| Actions rendered by this component, or action-label overrides for editor fields; expand the declared type. |
classNameOptional | string | undefined | Additional CSS classes applied to the component root. |
presetOptional |
| Reusable component appearance and option defaults. Explicit component props take precedence. |
valueOptional | string | undefined | Value to display or edit. The declared type identifies the supported representation; change callbacks describe how edited values are emitted. |
inputRefOptional |
| Reference or callback receiving the underlying input element. |
rootClassNameOptional | string | undefined | Additional CSS classes for the root part of the component. |
inputClassNameOptional | string | undefined | Additional CSS classes for the input part of the component. |
iconClassNameOptional | string | undefined | Additional CSS classes for the icon part of the component. |
shortcutClassNameOptional | string | undefined | Additional CSS classes for the shortcut part of the component. |
shortcutOptional | any | Keyboard shortcut hint displayed beside the search field. |
iconOptional | any | Icon content for the component. When the type is string, supply trusted SVG markup. |
leadingOptional | any | Content rendered before the search input. |
hideIconOptional | boolean | undefined | Hides the default search icon. |
trailingOptional | any | Content rendered after the search input. |
testIdOptional | string | undefined | Stable data attribute for locating the control in automated tests. |
typeOptional | "text" | "search" | undefined | Native input behavior: search or plain text. |
Events and callbacks2
| Name | Type | Description |
|---|---|---|
onValueChangeOptional |
| Receives the updated input value. Store it in application state and pass it back through value. |
onInputOptional |
| Handles native input events as the user edits the field. |
Methods0
No component-specific imperative methods. Use props and callbacks to control this component.