A NSW Government website
Design System v3.18.4

Visibility

Control the visibility of elements, without modifying their display, with visibility utilities.

Grid classes give you the option to show or hide elements in certain breakpoints. For example, displaying an image on a large screen when it supports the content, but hiding it on a small screen when it hinders the users access to information.

The classes are named using the format nsw-{display}-{breakpoint}

Where breakpoint is one of xs, sm, md, lg, xl.

Where display is one of:

  • show - displays the elements
  • hide - hides the elements

Showing

This text is only visible in large breakpoint and up

Hiding

This text is only visible from large breakpoint and lower

Visually hidden

Visually hide an element while still allowing it to be exposed to assistive technologies (such as screen readers) with .sr-only. Use .sr-only-focusable to visually hide an element by default, but to display it when it’s focused (e.g. by a keyboard-only user). .sr-only-focusable can also be applied to a container – thanks to :focus-within, the container will be displayed when any child element of the container receives focus.

Title for screen readers

Skip to main content
A container with a focusable element.

Both .sr-only and .sr-only-focusable can also be used as mixins.