Skip to main content

Visibility

Resize the browser to see these utility classes at work.

Visible at Specific Breakpoints

sm:visible
md:visible
lg:visible

Hidden at Specific Breakpoints

sm:hidden (shown at everything but sm)
md:hidden (shown at everything but md)
lg:hidden (shown at everything but lg)
These work according to the following chart:
Class specifierPixels
sm:visibleVisible only at sm-
md:visibleVisible only at md
lg:visibleVisible only at lg+
sm:hiddenHides at sm-
md:hiddenHides at md
lg:hiddenHides at lg+

While a few hiding (display: none) helpers exist (shown above), you may be better suited to conditionally unmount components at breakpoints using a useBreakpoint hook .

tip

Note: import { useBreakpoint } from "mainsail-ui" — This hook can be used to provide responsive reactivity in JS components, but should be used at a higher level if possible because it responds to window resizing and should be used sparingly.