Skip to main content

Common Examples

import { Footer } from "@servicetitan/ext-atlas";

function BasicFooter() {
  const [message, setMessage] = useState("");

  const handleSubmit = () => {
    console.log("Sending:", message);
    setMessage("");
  };

  return (
    <Footer
      message={message}
      onMessageChange={setMessage}
      onSubmit={handleSubmit}
    />
  );
}

With Loading State

Disable input during message processing:
import { Footer } from "@servicetitan/ext-atlas";

function FooterWithLoading() {
  const [message, setMessage] = useState("");
  const [isLoading, setIsLoading] = useState(false);

  const handleSubmit = async () => {
    setIsLoading(true);
    await sendMessage(message);
    setMessage("");
    setIsLoading(false);
  };

  return (
    <Footer
      message={message}
      onMessageChange={setMessage}
      onSubmit={handleSubmit}
      isLoading={isLoading}
    />
  );
}

With Additional Actions

Enable file upload and voice dictation:
import { Footer } from "@servicetitan/ext-atlas";

function FooterWithActions() {
  const [message, setMessage] = useState("");

  return (
    <Footer
      message={message}
      onMessageChange={setMessage}
      onSubmit={handleSubmit}
      onUploadFile={() => openFileDialog()}
      onDictateMessage={() => startVoiceInput()}
    />
  );
}

Custom Placeholder

import { Footer } from "@servicetitan/ext-atlas";

function FooterWithCustomPlaceholder() {
  const [message, setMessage] = useState("");

  return (
    <Footer
      message={message}
      onMessageChange={setMessage}
      onSubmit={handleSubmit}
      placeholder="Type your question here..."
    />
  );
}
Last modified on February 12, 2026