--- title: Dialog description: >- A dialog is a high-priority, intentionally disruptive message that requires action from the merchant before they can continue using POS. api_version: 2024-04 api_name: pos-ui-extensions source_url: html: 'https://shopify.dev/docs/api/pos-ui-extensions/2024-04/components/dialog' md: 'https://shopify.dev/docs/api/pos-ui-extensions/2024-04/components/dialog.md' --- # Dialogcomponent A dialog is a high-priority, intentionally disruptive message that requires action from the merchant before they can continue using POS. ## Dialog * title string required The text displayed in the title of the dialog. * actionText string required The text displayed in the primary action button of the dialog. * onAction () => void required A callback that performs when the action is triggered. * isVisible boolean required Whether the dialog should be presented. * content string The text displayed in the body of the dialog. * secondaryActionText string The text displayed in the secondary action section of the dialog. * showSecondaryAction boolean Whether a secondary action displays. * type DialogType Determines the dialog’s appearance and function. * onSecondaryAction () => void A callback that is executed when the secondary action is triggered. ### DialogType ```ts 'default' | 'alert' | 'error' | 'destructive' ``` ### Examples * #### Dialog example ##### React ```tsx import React, {useState} from 'react'; import { Button, Dialog, Screen, reactExtension, } from '@shopify/ui-extensions-react/point-of-sale'; const SmartGridModal = () => { const [visible, setVisible] = useState(false); const handlePrimaryAction = () => { setVisible(false); console.log('Primary action pressed'); }; const handleSecondaryAction = () => { setVisible(false); console.log('Secondary action pressed'); }; return (