Responsive utilities For faster mobile-friendly development, use these utility classes for showing and hiding content by device via media query. Also included are utility classes for toggling content when printed.
Try to use these on a limited basis and avoid creating entirely different versions of the same site. Instead, use them to complement each device’s presentation.
Available classes:
.hidden-*-up
classes hide the element when the viewport is at the given breakpoint or wider. For example, .hidden-md-up
hides an element on medium, large, and extra-large viewports..hidden-*-down
classes hide the element when the viewport is at the given breakpoint or smaller. For example, .hidden-md-down
hides an element on extra-small, small, and medium viewports..hidden-*-up
class with one .hidden-*-down
class to show an element only on a given interval of screen sizes. For example, .hidden-sm-down.hidden-xl-up
shows the element only on medium and large viewports. Using multiple .hidden-*-up
classes or multiple .hidden-*-down
classes is redundant and pointless.Extra small devices Portrait phones (<544px) | Small devices Landscape phones (≥544px - <768px) | Medium devices Tablets (≥768px - <992px) | Large devices Desktops (≥992px - <1200px) | Extra large devices Desktops (≥1200px) | |
---|---|---|---|---|---|
.hidden-xs-down |
Hidden | Visible | Visible | Visible | Visible |
.hidden-sm-down |
Hidden | Hidden | Visible | Visible | Visible |
.hidden-md-down |
Hidden | Hidden | Hidden | Visible | Visible |
.hidden-lg-down |
Hidden | Hidden | Hidden | Hidden | Visible |
.hidden-xl-down |
Hidden | Hidden | Hidden | Hidden | Hidden |
.hidden-xs-up |
Hidden | Hidden | Hidden | Hidden | Hidden |
.hidden-sm-up |
Visible | Hidden | Hidden | Hidden | Hidden |
.hidden-md-up |
Visible | Visible | Hidden | Hidden | Hidden |
.hidden-lg-up |
Visible | Visible | Visible | Hidden | Hidden |
.hidden-xl-up |
Visible | Visible | Visible | Visible | Hidden |