tailwindcss/docs/source/docs/visibility.blade.md
2017-12-03 02:55:40 +01:00

2.5 KiB

extends title description features
_layouts.documentation Visibility Utilities for controlling the visible of an element.
responsive customizable hover focus
true false false false

@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 Default

Use .visible to make an element visible. This will typically be used as a reset when using the .invisible utility.

@component('_partials.code-sample', ['class' => 'flex justify-center'])

@endcomponent

Invisible

Use .invisible to hide an element, but still maintain its space.

@component('_partials.code-sample', ['class' => 'flex justify-center'])

@endcomponent

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')

@endslot @slot('sm')
@endslot @slot('md')
@endslot @slot('lg')
@endslot @slot('xl')
@endslot @slot('code')
@endslot @endcomponent

Customizing

@include('_partials.variants-and-disabling', [ 'utility' => [ 'name' => 'visibility', 'property' => 'visibility', ], 'variants' => [ 'responsive', ], ])