> ## 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.

# System Message – Code

> SystemMessage displays interactive prompts with radio button options.

> [!WARNING]
>
> Atlas is deprecated. Use [AI Kit](https://anvil.servicetitan.com/docs/building-agentic-experiences) for any new Atlas experiences.

> [tab] Implementation
>
> ext-atlas-system-message-demo
>
> [StackBlitz demo](https://stackblitz.com/github/servicetitan/anvil2-docs-live-code/tree/main/examples/ext-atlas-system-message-demo?file=src/App.tsx)
>
> ```tsx lines expandable theme={null}
> import { SystemMessage } from "@servicetitan/anvil2-ext-atlas";
> import { Card } from "@servicetitan/anvil2";
> import { useState } from "react";
>
> function App() {
>   const [selectedValue, setSelectedValue] = useState("option1");
>
>   return (
>     <Card
>       flexDirection="column"
>       gap={4}
>       background="strong"
>       style={{ width: "388px" }}
>     >
>       <SystemMessage
>         message="Please select an action to continue:"
>         radioOptions={[
>           {
>             label: "Option 1",
>             description: "This is the first option",
>             value: "option1",
>           },
>           {
>             label: "Option 2",
>             description: "This is the second option",
>             value: "option2",
>           },
>           {
>             label: "Option 3",
>             description: "This is the third option",
>             value: "option3",
>           },
>         ]}
>         selectedValue={selectedValue}
>         onRadioChange={(value) => setSelectedValue(value)}
>         buttonText="Continue"
>         onSubmit={() => console.log("submitted:", selectedValue)}
>       />
>     </Card>
>   );
> }
>
> export default App;
> ```
>
> ## Common Examples
>
> ### Basic Usage
>
> Interactive prompt with radio options:
>
> ```tsx theme={null}
> import { SystemMessage } from "@servicetitan/anvil2-ext-atlas";
>
> function SystemMessageExample() {
>   const [selected, setSelected] = useState("");
>
>   return (
>     <SystemMessage
>       message="How would you like to proceed?"
>       radioOptions={[
>         { value: "continue", label: "Continue", description: "Proceed with current settings" },
>         { value: "modify", label: "Modify", description: "Change the settings first" },
>       ]}
>       selectedValue={selected}
>       onRadioChange={setSelected}
>       buttonText="Confirm"
>       onSubmit={() => handleSubmit(selected)}
>     />
>   );
> }
> ```
>
> ### With Disabled Submit
>
> Disable submit until selection is made:
>
> ```tsx theme={null}
> import { SystemMessage } from "@servicetitan/anvil2-ext-atlas";
>
> function SystemMessageDisabled() {
>   const [selected, setSelected] = useState("");
>
>   return (
>     <SystemMessage
>       message="Choose an option to continue"
>       radioOptions={options}
>       selectedValue={selected}
>       onRadioChange={setSelected}
>       buttonText="Continue"
>       onSubmit={() => handleSubmit(selected)}
>       buttonDisabled={!selected}
>     />
>   );
> }
> ```

> [tab] SystemMessage API
>
> ```tsx theme={null}
> <SystemMessage
>   message="Select an option"
>   radioOptions={options}
>   selectedValue={selected}
>   onRadioChange={setSelected}
>   buttonText="Confirm"
>   onSubmit={handleSubmit}
>   buttonDisabled={false}
> />
> ```
>
> ## `SystemMessage` Props
>
> **buttonText** `string` *required*
>
> Text to display on the submit button.
>
> **message** `string` *required*
>
> The prompt message to display.
>
> **onRadioChange** `(value: string) =\> void` *required*
>
> Callback fired when the selected option changes.
>
> **onSubmit** `() =\> void` *required*
>
> Callback fired when the submit button is clicked.
>
> **radioOptions** `Array\<\{ label: string; description?: string; value: string \}\>` *required*
>
> Array of options to display as radio buttons.
>
> **selectedValue** `string` *required*
>
> The currently selected option value.
>
> **buttonDisabled** `boolean` (default: false)
>
> When true, disables the submit button.
>
> **className** `string`
>
> Additional CSS class name for custom styling.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.