Skip to main content

Common Examples

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

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

  const handleSend = (text: string) => {
    console.log("Sending:", text);
  };

  return (
    <ChatComposerRich
      message={message}
      onChange={setMessage}
      onSend={handleSend}
    />
  );
}

With Action Menu

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

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

  return (
    <ChatComposerRich
      message={message}
      onChange={setMessage}
      onSend={handleSend}
      onUploadFile={() => openFileDialog()}
      onDictateMessage={() => startVoiceRecognition()}
    />
  );
}

Disabled State

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

function DisabledComposer() {
  const [isProcessing, setIsProcessing] = useState(false);

  return (
    <ChatComposerRich
      message=""
      onChange={() => {}}
      onSend={handleSend}
      disabled={isProcessing}
      placeholder="Processing your request..."
    />
  );
}

Custom Placeholder

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

function CustomPlaceholderComposer() {
  return (
    <ChatComposerRich
      message=""
      onChange={setMessage}
      onSend={handleSend}
      placeholder="Type your question here..."
    />
  );
}
Last modified on February 12, 2026