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
- Click Add block
- Navigate to DCS section, then select Dialog (alternatively you can enter 'Dialog' in the search box)
- From the Variant dropdown select either Simple or Callout.
- In the Open button label add the text for the button that will be on your webpage that will open the dialog.
- 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.
- The Dialog type should have the Single call of action option selected from the dropdown.
- Add a Dialog title. This will be the heading at the top of your dialog.
- The Dialog body is an optional field where you can add information that you would like displayed within your dialog.
- 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.
- Scroll to Action buttons.
- Add a Primary button label. This is the text that will be on the button within your dialog that links to another URL.
- 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.
See this live on nsw.gov.au
Need any more help?
If you have any questions, or require assistance with anything mentioned in this article, submit a request via the webform.