Skip to main content
Atlas is an extended component library designed for building AI-powered chat interfaces. It provides a comprehensive set of components for creating conversational UI experiences, including chat windows, message displays, input composers, and recommendation cards.

Installation

Atlas components are available from the @servicetitan/ext-atlas package:
npm install @servicetitan/ext-atlas

Import

import {
  ChatWindow,
  Header,
  Footer,
  Content,
  AssistantMessage,
  UserMessage,
  MarkdownMessage,
} from "@servicetitan/ext-atlas";

Key Features

Chat Window System

The core chat experience is built around composable components that work together:
  • ChatWindow - The main container with open/close animations and positioning
  • Header - Configurable header with drag, fullscreen, and navigation controls
  • Footer - Message input area with the rich text composer
  • Content - Scrollable message container with auto-scroll behavior

Message Components

Display different types of messages in the conversation:
  • UserMessage - Messages sent by the user
  • AssistantMessage - Simple text responses from Atlas
  • MarkdownMessage - Rich markdown-formatted responses with toolbox actions
  • SystemMessage - Interactive system prompts with radio options
  • ErrorMessage - Error states with retry functionality

Recommendation Cards

Present actionable recommendations to users:
  • SingleRecommendationCard - Single-select options with radio buttons
  • MultipleRecommendationCard - Multi-select options with checkboxes
  • ConfirmationCard - Simple confirmation prompts with action buttons

Utility Components

Supporting components for common patterns:
  • Suggestion / SuggestionList - Clickable suggestion chips
  • Toolbox - Copy, like, dislike, and retry actions for messages
  • Loader - Animated loading indicator for pending responses
  • Spinner - Full-screen loading spinner
  • Welcome - Onboarding welcome screen
  • SystemError - Error state display

Hooks

React hooks for managing chat window behavior:
  • useDraggable - Make the chat window draggable with boundary constraints
  • useInfiniteScroll - Load more content when scrolling
  • useScrollCallback - Respond to scroll position changes

Component Architecture

The Atlas components are designed to be composed together to create a complete chat experience:
import {
  ChatWindow,
  Header,
  Content,
  Footer,
  UserMessage,
  MarkdownMessage,
} from "@servicetitan/ext-atlas";

function AtlasChat() {
  const [open, setOpen] = useState(false);
  const [messages, setMessages] = useState([]);
  const [inputMessage, setInputMessage] = useState("");

  return (
    <ChatWindow open={open}>
      <Header
        title="Atlas"
        onClose={() => setOpen(false)}
        onCreateNewChat={handleNewChat}
      />
      <Content itemsLength={messages.length}>
        {messages.map((msg) =>
          msg.type === "user" ? (
            <UserMessage key={msg.id} message={msg.content} />
          ) : (
            <MarkdownMessage key={msg.id} message={msg.content} />
          )
        )}
      </Content>
      <Footer
        message={inputMessage}
        onMessageChange={setInputMessage}
        onSubmit={handleSend}
      />
    </ChatWindow>
  );
}

Dependencies

Atlas components are built on top of the core Anvil2 component library and include:
  • Anvil2 - Core UI components (Button, Card, Flex, Text, etc.)
  • Framer Motion - Animations and transitions
  • React Markdown - Markdown rendering for message content
  • MobX React - Observable state management (optional)
Last modified on February 12, 2026