Visibility
@include('_partials.class-table', [ 'rows' => [ [ '.visible', 'visibility: visible;', "Make an element visible.", ], [ '.invisible', 'visibility: hidden;', "Hide an element without affecting the layout of the document.", ], ] ])
Visible
Use .visible
to make an element visible. This is mostly useful for undoing the .invisible
utility at different screen sizes.
@component('_partials.code-sample', ['class' => 'flex justify-center'])
@slot('code')Invisible
Use .invisible
to hide an element, but still maintain its place in the DOM, affecting the layout of other elements (compare with .hidden
from the display documentation).
@component('_partials.code-sample', ['class' => 'flex justify-center'])
@slot('code')Responsive
To apply a visibility utility only at a specific breakpoint, add a {screen}:
prefix to the existing class name. For example, adding the class md:invisible
to an element would apply the invisible
utility at medium screen sizes and above.
For more information about Tailwind's responsive design features, check out the Responsive Design documentation.
@component('_partials.responsive-code-sample') @slot('none')
Customizing
@include('_partials.variants-and-disabling', [ 'utility' => [ 'name' => 'visibility', 'property' => 'visibility', ], 'variants' => [ 'responsive', ], ])