Browse documentation

Reference / Layout

Visibility

Control whether a box is painted while keeping its reserved space in the layout.

Working example

The invisible middle label still occupies the second track. The collapse value also has special behavior on table rows and columns.

HTML
<div class="grid grid-cols-3 gap-2 text-center">
  <span class="border p-2">Cover</span>
  <span class="invisible border p-2">Insert</span>
  <span class="border p-2">Index</span>
</div>

Class reference

ClassCSS declarations
visiblevisibility: visible;
invisiblevisibility: hidden;
collapsevisibility: collapse;
View full generated CSS
Compiled CSS
.collapse {
  visibility: collapse;
}
.invisible {
  visibility: hidden;
}
.visible {
  visibility: visible;
}