---
title: "Adding a Dialog"
canonical: "https://nsw-gov-au-help-hub.refined.site/space/HHK/601785068/Adding%20a%20Dialog"
format: markdown
---
A dialog is a type of modal window that appears to prompt users for input, display information, or ask for confirmation before proceeding with an action. 

## When to use a Dialog

### Do

- Use Dialog to prompt users the needs to know before continuing
- Use Dialog when the user is required to make a choice or enter information before continuing

### Don't

- Avoid Dialog for non-essential information
- Avoid Dialog for complex decision making that requires additional resources or information unavailable in the modal
- Avoid Dialog that breaks user flow

---

## How to use a Dialog

1. Click **Add block**
2. Navigate to **DCS **section, then select **Dialog** (alternatively you can enter 'Dialog' in the search box)
3. From the **Variant** dropdown select either **Simple** or **Callout**.
4. In the **Open button label** add the text for the button that will be on your webpage that will open the dialog.
5. If you have selected **Callout** as your variant, you also add text in the optional **Copy** field. Ignore this step if you have selected **Variant > Simple**.
6. The **Dialog type** should have the **Single call of action** option selected from the dropdown.
7. Add a **Dialog title**. This will be the heading at the top of your dialog.
8. The **Dialog body** is an optional field where you can add information that you would like displayed within your dialog.
9. The **Legal disclaimer** is optional. If you would like it to display, tick the **Display legal disclaimer** box and add your legal message in the **Body** field below it.
10. Scroll to **Action buttons**.
11. Add a **Primary button label**. This is the text that will be on the button within your dialog that links to another URL.
12. Add a **Primary button link**. This is the link that customers will go to if they press the button within the dialog.

For how to include a Dialog on a standard page, see [Adding a custom block to a standard page – nsw.gov.au Help Hub](https://nsw-gov-au-help-hub.refined.site/space/HHK/601752269/Adding+a+custom+block+to+a+standard+page#How-to-add-a-custom-block-on-a-page).

---

> ℹ️ ## See this live on [http://nsw.gov.au](http://nsw.gov.au) 
> ℹ️ 
> ℹ️ - [Change of name | NSW Government](https://www.nsw.gov.au/family-and-relationships/name-changes-and-corrections/change-of-name)
> ℹ️ - [How NSW Fair Trading handles general complaints | NSW Government](https://www.nsw.gov.au/departments-and-agencies/fair-trading/complaints-and-enquiries/how-nsw-fair-trading-handles-general-complaints)