Skip to main content

Common Examples

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

function BasicHeader() {
  return (
    <Header
      title="Atlas"
      onClose={() => console.log("Close clicked")}
    />
  );
}

With All Actions

Enable all available header actions:
import { Header } from "@servicetitan/ext-atlas";

function FullHeader() {
  return (
    <Header
      title="Atlas"
      onBack={() => navigateBack()}
      onViewHistory={() => openHistory()}
      onFullscreen={() => toggleFullscreen()}
      onCreateNewChat={() => startNewChat()}
      onClose={() => closeWindow()}
      historyCount={5}
    />
  );
}

Draggable Header

Enable the drag handle for repositioning the chat window:
import { Header, useDraggable } from "@servicetitan/ext-atlas";

function DraggableHeader() {
  const { isDragging, handleMouseDown } = useDraggable();

  return (
    <Header
      title="Atlas"
      isDraggable
      isDragging={isDragging}
      onMouseDown={handleMouseDown}
      onClose={() => closeWindow()}
    />
  );
}

With Title Badge

Display a badge next to the title:
import { Header } from "@servicetitan/ext-atlas";

function HeaderWithBadge() {
  return (
    <Header
      title="Atlas"
      titleBadge="Beta"
      onClose={() => closeWindow()}
    />
  );
}

Expanded State

In fullscreen mode, the drag handle is hidden:
import { Header } from "@servicetitan/ext-atlas";

function ExpandedHeader() {
  const [isExpanded, setIsExpanded] = useState(false);

  return (
    <Header
      title="Atlas"
      isExpanded={isExpanded}
      onFullscreen={() => setIsExpanded(!isExpanded)}
      onClose={() => closeWindow()}
    />
  );
}
Last modified on February 12, 2026