Skip to main content

Common Examples

Basic Usage

Simple confirmation prompt:
import { ConfirmationCard } from "@servicetitan/ext-atlas";

function ConfirmationExample() {
  return (
    <ConfirmationCard
      recommendationId="rec-789"
      message="Would you like to proceed with this booking?"
      description="Your appointment will be scheduled for tomorrow at 2:00 PM"
      actions={[
        { id: "confirm", name: "Confirm Booking", type: "primary" },
        { id: "reschedule", name: "Choose Different Time", type: "secondary" },
      ]}
      onSubmit={(response) => handleAction(response)}
    />
  );
}
Include a navigation link:
import { ConfirmationCard } from "@servicetitan/ext-atlas";

function ConfirmationWithLink() {
  return (
    <ConfirmationCard
      recommendationId="rec-789"
      message="Ready to book your service?"
      actions={[
        { id: "confirm", name: "Confirm", type: "primary" },
        { id: "cancel", name: "Cancel", type: "ghost" },
        { id: "learn-more", name: "Learn More", type: "link", url: "/help/booking" },
      ]}
      onSubmit={(response) => handleAction(response)}
    />
  );
}

Submitted State

Show disabled state after submission:
import { ConfirmationCard } from "@servicetitan/ext-atlas";

function SubmittedExample() {
  return (
    <ConfirmationCard
      recommendationId="rec-789"
      message="Booking confirmed!"
      description="Your appointment has been scheduled."
      actions={actions}
      onSubmit={() => {}}
      submitted={true}
    />
  );
}
Last modified on February 12, 2026