# st.dialog

Source: https://docs.streamlit.io/develop/api-reference/execution-flow/st.dialog

* Function signature:

   ```python
   st.dialog(title, *, width="small", position="center", dismissible=True, icon=None, on_dismiss="ignore")
   ```

* Parameters:

   | name | type | default | description |
   |---|---|---|---|
   | title | str |  | The title to display at the top of the modal dialog. It cannot be empty. The title can optionally contain GitHub-flavored Markdown of the following types: Bold, Italics, Strikethroughs, Inline Code, Links, and Images. Images display like icons, with a max height equal to the font height. Unsupported Markdown elements are unwrapped so only their children (text contents) render. Common block-level Markdown (headings, lists, blockquotes) is automatically escaped and displays as literal text in labels. See the body parameter of st.markdown for additional, supported Markdown directives. |
   | width | "small", "medium", "large", or int |  | The width of the modal dialog. This can be one of the following:  "small" (default): The modal dialog will be a maximum of 500 pixels wide. "medium": The modal dialog will be up to 750 pixels wide. "large": The modal dialog will be up to 1280 pixels wide. An integer specifying the width in pixels: The modal dialog has a fixed width. If the specified width is greater than the width of the viewport, the dialog shrinks to fit. The dialog is never narrower than 200 pixels (scaled by the theme's baseFontSize) unless the viewport is narrower. If position is "left" or "right", this is the drawer's initial width. |
   | position | "center", "left", "right" |  | The position of the modal dialog. This can be one of the following:  "center" (default): The modal dialog is centered in the viewport. "left": The dialog is shown as a user-resizable full-height drawer attached to the left side of the viewport. "right": The dialog is shown as a user-resizable full-height drawer attached to the right side of the viewport. |
   | dismissible | bool |  | Whether the modal dialog can be dismissed by the user. If this is True (default), the user can dismiss the dialog by clicking outside of it, clicking the "X" in its upper-right corner, or pressing ESC on their keyboard. If this is False, the "X" in the upper-right corner is hidden and the dialog must be closed programmatically by calling st.rerun() inside the dialog function.  Note Setting dismissible to False does not guarantee that all interactions in the main app are blocked. Don't rely on dismissible for security-critical checks. |
   | icon | str or None |  | An optional emoji or icon to display next to the dialog title. If icon is None (default), no icon is displayed. If icon is a string, the following options are valid:  A single-character emoji. For example, you can set icon="🚨" or icon="🔥". Emoji short codes are not supported.  An icon from the Material Symbols library (rounded style) in the format ":material/icon_name:" where "icon_name" is the name of the icon in snake case. For example, icon=":material/thumb_up:" will display the Thumb Up icon. Find additional icons in the Material Symbols  font library.  "spinner": Displays a spinner as an icon. |
   | on_dismiss | "ignore", "rerun", or callable |  | How the dialog should respond to dismissal events. This can be one of the following:  "ignore" (default): Streamlit will not rerun the app when the user dismisses the dialog. "rerun": Streamlit will rerun the app when the user dismisses the dialog. A callable: Streamlit will rerun the app when the user dismisses the dialog and execute the callable as a callback function before the rest of the app. |
