visibility

Class Description

visible

Sets visibility: visible.

CSS Rules

.visible {
  visibility: visible;
}

Usage

<element class="visible" />

Responsive

Prefix .visible utility with a breakpoint variant (e.g., md:) to apply styles at specific screen sizes (Supported breakpoints are xm through 2xl).

<element class="md:visible" />

States

States are generated dynamically at runtime and always come last. Append a state like :hover or :focus to the end of the class. This works in conjunction with breakpoints .

Supported pseudo-classes: :hover, :active, :focus, :focus-visible, :focus-within, :target, :checked, :disabled, and :group-hover.

<element class="visible:hover" />

Group Hover Example

The :group-hover state applies styles when a parent element with the .group class is hovered.

<element class="group">
  <element class="visible:group-hover">...</element>
</element>

Pseudo-Elements

The ::before and ::after utility classes are supported too. Granted that you add the mandatory content-before or content-after class in order for them to work.

<element class="content-before visible::before" />

<element class="content-after visible::after" />
.visible Sets visibility: visible.

invisible

Sets visibility: hidden. Hides the element while preserving its space.

CSS Rules

.invisible {
  visibility: hidden;
}

Usage

<element class="invisible" />

Responsive

Prefix .invisible utility with a breakpoint variant (e.g., md:) to apply styles at specific screen sizes (Supported breakpoints are xm through 2xl).

<element class="md:invisible" />

States

States are generated dynamically at runtime and always come last. Append a state like :hover or :focus to the end of the class. This works in conjunction with breakpoints .

Supported pseudo-classes: :hover, :active, :focus, :focus-visible, :focus-within, :target, :checked, :disabled, and :group-hover.

<element class="invisible:hover" />

Group Hover Example

The :group-hover state applies styles when a parent element with the .group class is hovered.

<element class="group">
  <element class="invisible:group-hover">...</element>
</element>

Pseudo-Elements

The ::before and ::after utility classes are supported too. Granted that you add the mandatory content-before or content-after class in order for them to work.

<element class="content-before invisible::before" />

<element class="content-after invisible::after" />
.invisible Sets visibility: hidden. Hides the element while preserving its space.

collapse

Sets visibility to collapse, hiding the element while preserving table row/column layout space.

CSS Rules

.collapse {
  visibility: collapse;
}

Usage

<element class="collapse" />

Responsive

Prefix .collapse utility with a breakpoint variant (e.g., md:) to apply styles at specific screen sizes (Supported breakpoints are xm through 2xl).

<element class="md:collapse" />

States

States are generated dynamically at runtime and always come last. Append a state like :hover or :focus to the end of the class. This works in conjunction with breakpoints .

Supported pseudo-classes: :hover, :active, :focus, :focus-visible, :focus-within, :target, :checked, :disabled, and :group-hover.

<element class="collapse:hover" />

Group Hover Example

The :group-hover state applies styles when a parent element with the .group class is hovered.

<element class="group">
  <element class="collapse:group-hover">...</element>
</element>

Pseudo-Elements

The ::before and ::after utility classes are supported too. Granted that you add the mandatory content-before or content-after class in order for them to work.

<element class="content-before collapse::before" />

<element class="content-after collapse::after" />
.collapse Sets visibility to collapse, hiding the element while preserving table row/column layout space.