Skip to main content

Display

This utility allows to show or hide elements depending on certain conditions.

Difference between packages

For the React package, use the <Display /> component. This fully removes its chidlren from the DOM, while the classes from the pallote-css only hides them with display: none.

Props

Show

<Display show="mobileSm">{/* content */} </Display>
<Display show="mobile">{/* content */} </Display>
<Display show="tablet">{/* content */} </Display>
<Display show="laptop">{/* content */} </Display>
<Display show="desktop">{/* content */} </Display>
<Display show="touch">{/* content */} </Display>

Hide

<Display hide="mobileSm">{/* content */} </Display>
<Display hide="mobile">{/* content */} </Display>
<Display hide="tablet">{/* content */} </Display>
<Display hide="laptop">{/* content */} </Display>
<Display hide="desktop">{/* content */} </Display>
<Display hide="touch">{/* content */} </Display>

Props details

PropValuesDefault
showmobileSm mobile tablet laptop desktop touch
hidemobileSm mobile tablet laptop desktop touch