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:
This text is only visible in large breakpoint and up
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.
Both .sr-only
and .sr-only-focusable
can also be used as mixins.