Skip to main content

Common Examples

Basic Usage

Display a simple text response:
import { AssistantMessage } from "@servicetitan/ext-atlas";

function AssistantMessageExample() {
  return (
    <AssistantMessage message="I can help you with that! Let me look up the information." />
  );
}

Loading State

Show loading indicator when waiting for response:
import { AssistantMessage } from "@servicetitan/ext-atlas";

function AssistantMessageLoading() {
  // When message is undefined, shows loading indicator
  return <AssistantMessage />;
}

Custom Branding

Use custom icon and assistant name:
import { AssistantMessage } from "@servicetitan/ext-atlas";
import CustomLogo from "./custom-logo.svg";

function CustomBrandedMessage() {
  return (
    <AssistantMessage
      message="Hello from the custom assistant!"
      svgIcon={CustomLogo}
      assistant="My Assistant"
    />
  );
}
Last modified on February 12, 2026