...

/

Hide Based on Size

Hide Based on Size

Learn how to hide parts of applications to fit on a smaller screen.

Hiding elements for different screens

One way to make our application fit on a smaller screen is by hiding parts of the user interface on the smaller screen. In this case, because the smallest screen behavior is hidden, the unprefixed property is .hidden. We might want the item to display at larger sizes, so we add in .lg:block, winding up with class="hidden lg:block".

Sometimes we may want to go the other way and display an element at a smaller size but not at a larger one. It’s quite common to have an element for a ...