Tessera
GitHub

Forms

SearchField

Text input for search with a leading search icon and a clear button once filled.

  • Placeholder says what can be searched (“Search cases by number or customer”).
  • In filter rows it sits first and takes the remaining width; in the AppHeader it is sm.

When to use

Filter or search a list, table or the app.

Use something else

Pick a single value from options → Combobox.

Do

  • Placeholder names what is searched (“Search orders”).
  • Filter as people type for local lists; search on Enter for server queries.

Don't

  • Don't put more than one SearchField on a page region.

Props

PropType
placeholderstring
labelstring
defaultValuestring
onChange(value: string) => void; size?: 'sm' | 'md' | 'lg'; disabled?: boolean; className?: string

Use

const { SearchField } = window.Tessera;
const el = React.createElement(SearchField, { /* props */ });