Use the Quick exit component on pages where a user could be at risk if someone else sees what they are viewing.
This includes content related to:
Quick exit is a safety mechanism, not a navigational tool. It should only be used when speed, discretion and predictability are essential.
The label "Exit now" is fixed and must not be changed. This consistency ensures recognisability across all NSW Government websites and improves recognition in high-stress situations.
Briefly explain how the control works and mention the keyboard shortcut. Keep the language clear, calm and factual, and avoid wording that may increase stress.
The Quick exit control is positioned at the bottom of the viewport, and remain visible as users scroll.
Activating it immediately redirects the user to the configured safe URL.
When JavaScript is enabled:
display: none to the <html> element.Without JavaScript, the control still works as a standard link.
Behaviour is intentionally simple and predictable to reduce cognitive load under stress.
Redirect users to a neutral, trusted page such as nsw.gov.au, bom.gov.au or google.com/hp. Choose and customise the destination based on who your users are and how they are likely to use the service, and test it to ensure it feels safe, appropriate and low-risk in context.
Quick exit can optionally be triggered by pressing the Esc key twice in quick succession within a one-second window.
This feature is enabled via enableEsc: true. It provides an alternative, discreet way for users to leave the page without needing to move the pointer or locate the control visually. It can be particularly helpful for keyboard users or in situations where using the mouse may draw attention.
Implement the global sticky container described in the Global page structure guide. This container hosts all bottom-sticky elements, including Quick exit and Cookie consent, ensuring consistent placement and predictable stacking.
Using the global sticky container:
Render the Quick exit HTML directly in your CMS or page template inside the global sticky container.
This ensures:
Use CMS- or template-level logic to control when the component appears, for example only on pages where safety or privacy risk applies.
When JavaScript is available, the Quick exit script enhances the server-rendered element with cloak mode, double-Esc activation, and first-Tab focus behaviour. Without JavaScript, the link still functions as a standard navigation to the safe URL.
Include the screen-reader-only announcement message in your Masthead template, immediately before the Skip Link container.
This ensures the message:
When JavaScript is enabled, the Quick exit script will also inject the same announcement message. This should be treated strictly as progressive enhancement, not the primary mechanism.
Do not add a separate "skip to Quick exit" link.
Load the NSW Design System JavaScript bundle to enable progressive enhancements, including:
The server-rendered Quick exit element must exist before the JavaScript runs.
Use window.NSW.QuickExit.init() only if your CMS cannot render the Quick exit markup server-side.
This approach:
Server-rendered HTML remains the preferred and recommended approach for accessibility and resilience.
Quick exit is designed to meet WCAG 2.2 AA when implemented and configured correctly. As a safety-critical component, it must remain accessible and functional in all supported environments, including when JavaScript is unavailable.
Quick exit is designed with visual accessibility built in.
Teams should avoid overriding styles or layout, as doing so may reduce visibility or make it harder to use in high-stress situations.
Always test Quick exit with:
This helps confirm the component behaves predictably and remains accessible in high-stress or constrained environments.