Documentation Index
Fetch the complete documentation index at: https://anvil.servicetitan.com/llms.txt
Use this file to discover all available pages before exploring further.
Suggestion and SuggestionList display clickable suggestion chips for common prompts.
Documentation Index
Fetch the complete documentation index at: https://anvil.servicetitan.com/llms.txt
Use this file to discover all available pages before exploring further.
import { Suggestion } from "@servicetitan/anvil2-ext-atlas";
function SingleSuggestion() {
return (
<Suggestion
text="How do I schedule an appointment?"
onClick={(text) => sendMessage(text)}
/>
);
}
import { SuggestionList } from "@servicetitan/anvil2-ext-atlas";
function MultipleSuggestions() {
const suggestions = [
"How do I schedule an appointment?",
"What are your business hours?",
"Tell me about your services",
];
return (
<SuggestionList
suggestions={suggestions}
onSelect={(text) => sendMessage(text)}
/>
);
}
import { SuggestionList } from "@servicetitan/anvil2-ext-atlas";
function ContextualSuggestions({ topic }) {
const suggestions = useMemo(() => {
if (topic === "scheduling") {
return ["Book now", "See availability", "Reschedule"];
}
return ["Get started", "Learn more", "Contact us"];
}, [topic]);
return (
<SuggestionList
suggestions={suggestions}
onSelect={handleSelect}
/>
);
}
<Suggestion
text="How do I schedule?"
onClick={handleClick}
/>
Suggestion PropsWas this page helpful?