Skip to main content

Documentation Index

Fetch the complete documentation index at: https://anvil.servicetitan.com/llms.txt

Use this file to discover all available pages before exploring further.

Common Examples

import { SearchField } from "@servicetitan/anvil2";

function ExampleComponent() {
  return <SearchField />;
}

Controlling search inputs

The value of search inputs are uncontrolled by default. To control a search input, use the value prop.

Uncontrolled

Controlled

Form Example

The SearchField component uses an HTML input and so can be used within an HTML form the same way that a regular HTML input element can.

React Accessibility

Add aria-label or aria-labelledby so that screen readers can properly announce what this is searching.For more guidance on form field labels and context, see input field context association best practices.
Last modified on April 9, 2026