The canonical addon pattern: a search icon in the prefix slot, a clear button in the suffix slot. The button uses the built-in 'clear' preset — no handler code required.
Live Demo
Config (for the active adapter)
{
key: 'search',
type: 'input',
label: 'Search',
addons: [
{ slot: 'prefix', kind: 'mat-icon', icon: 'search', ariaLabel: 'Search' },
{ slot: 'suffix', kind: 'mat-button', icon: 'close', ariaLabel: 'Clear', preset: 'clear' },
],
}
What to read next
- Addons / Overview — kinds, slots, reactive
hidden/disabled. - Presets and Actions — the five built-in presets and how to register your own via
actionRef.