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 { Alert } from "@servicetitan/anvil2";

function ExampleComponent() {
  return (
    <Alert status="warning" title="Warning!">
      This is a warning message.
    </Alert>
  );
}

Alert statuses

Use the status prop to set the color and icon of the Alert.

Closable alerts

Make an alert closable by providing a value to the onClose prop.

Alerts with actions

It is common to use Anvil2 Buttons within alerts to create actions. These can easily be arranged using the Flex component.

AI Mark

Add an AI Mark inline after the alert title by passing aiMark. Use true for the sparkle only, or pass tooltip or popover configuration.
Last modified on April 21, 2026