Hidden

Import
import { Hidden } from "reshaped";
import type { HiddenProps } from "reshaped";

Hidden provides a way to hide content according to the passed value.

<>
  <Hidden hide={true}>Hidden</Hidden>
  <Hidden hide={false}>Shown</Hidden>
</>

The hide property supports responsive syntax, allowing you to control visibility based on the viewport size.

<Hidden hide={{ s: true, l: false }}>Visible on l and xl screens</Hidden>

To keep the space for the element reserved, use the visibility flag to toggle CSS visibility: hidden instead of display: none.

<Hidden hide={true} visibility>
  With reserved space
</Hidden>