Modal

An overlay that appears in front of all other content, and requires a user to take an action before continuing.

Props

calloutVariant
GoabModalCalloutVariant
Sets the context and colour of the callout modal. Required when used as a callout type.
maxWidth
string
Set the max allowed width of the modal.
Defaults to 60ch.
open
boolean
Controls if the modal is visible or not.
testId
string
Sets a data-testid attribute for automated testing.
transition
GoabModalTransition
Sets the animation transition when opening/closing. 'fast' or 'slow' for animated, 'none' for instant.
calloutVariant
GoabModalCalloutVariant
Define the context and colour of the callout modal. It is required when type is set to callout.
closable
boolean
Show close icon and allow clicking the background to close the modal.
Defaults to false.
heading
string | TemplateRef<any>
The heading text displayed at the top of the modal.
maxWidth
string
Set the max allowed width of the modal.
open
boolean
Controls if modal is visible or not.
testId
string
Sets a data-testid attribute for automated testing.
transition
GoabModalTransition
Sets the animation transition when opening/closing. 'fast' or 'slow' for animated, 'none' for instant.
calloutvariant
""
Define the context and colour of the callout modal. It is required when type is set to callout.
closable
boolean true | false
Show close icon and allow clicking the background to close the modal.
Defaults to false.
heading
string
The heading text displayed at the top of the modal.
maxwidth
string
Set the max allowed width of the modal.
Defaults to 60ch.
open
boolean true | false
Controls if modal is visible or not.
Defaults to false.
testid
string
Sets a data-testid attribute for automated testing.
Defaults to modal.
transition
GoabModalTransition fast | slow | none
Sets the animation transition when opening/closing. 'fast' or 'slow' for animated, 'none' for instant.
Defaults to none.
version
GoabModalVersionType 1 | 2
Design system version for styling.
Defaults to 1.

Events

onClose
() => void
Callback fired when the modal is closed. When provided, enables the close button and backdrop click-to-close behavior.
onClose
() => void
Emits when the modal is closed.
_close
CustomEvent

ReactNode

actions
ReactNode
Content rendered in the modal's actions slot, typically action buttons.
heading
ReactNode
The heading text displayed at the top of the modal.
actions
TemplateRef
Content rendered in the modal's actions slot, typically action buttons.
heading
TemplateRef
The heading text displayed at the top of the modal.
actions
slot
Content rendered in the modal's actions slot, typically action buttons.
heading
slot
The heading text displayed at the top of the modal.
Examples

Add another item in a modal

Confirm a change

Confirm a destructive action

Confirm before navigating away

Require user action before continuing

Warn a user of a deadline

Content

Cancel application
Use descriptive language in both modal content and button text to inform users of the resulting destructive action.

Submitting the assessment will inform the proponent and email a copy of the report.

CancelSubmit
Use a concise and descriptive modal title that spans less than one line.

Are you sure that you want to cancel your application? This action will permanently cancel your application and delete any information collected.

BackCancel application
Use descriptive language in content and button text for destructive actions.

Types

Delete account
Use the destructive button variant for actions that cannot be easily undone, like permanently deleting data or removing a user from a system.
Delete record
Don't use a destructive button to trigger a confirmation. Reserve destructive styling for the final action inside the modal.

Other

Use closable=false for critical confirmations where the user must choose an explicit action, not just dismiss the dialog.

Interaction

Are you sure that you want to delete this record?

CancelDelete record
Use a destructive button to indicate the final destructive action.

Submitting the assessment will inform the proponent.

SecondaryPrimary
Don't provide both action buttons and a close button on the same modal.
All GoA Design System components are built to meet WCAG 2.2 AA standards. The following guidelines provide additional context for accessible implementation.

No accessibility-specific guidelines have been documented for this component yet.

View old component docs