Visibility
Set whether an element is visible or hidden.
Widely available
This feature is well established and works across many devices and browser versions.
Chrome
Edge
Firefox
Safari
Usage
Visible
Display the element normally in the layout.
A
B
C
<div class="d-g g-4 gtc-1 sm:gtc-3"> <div class="d-f v-v ai-c jc-c w-16 h-16 bg-indigo c-white">A</div> <div class="d-f ai-c jc-c w-16 h-16 bg-indigo c-white">B</div> <div class="d-f ai-c jc-c w-16 h-16 bg-indigo c-white">C</div></div>Collapse
Hide the element without taking up space.
| H1 | H2 |
|---|---|
| A | B |
| C | D |
| E | F |
<table class="w-full c-slate bw-1 bs-d bc-c"> <thead> <tr> <th class="p-3 bg-silver-2 bc-slate bw-1 bs-d ta-c">H1</th> <th class="p-3 bg-silver-2 bc-slate bw-1 bs-d ta-c">H2</th> </tr> </thead> <tbody> <tr> <td class="p-3 bc-slate bw-1 bs-d ta-c">A</td> <td class="p-3 bc-slate bw-1 bs-d ta-c">B</td> </tr> <tr class="v-c"> <td class="p-3 bc-slate bw-1 bs-d ta-c">C</td> <td class="p-3 bc-slate bw-1 bs-d ta-c">D</td> </tr> <tr> <td class="p-3 bc-slate bw-1 bs-d ta-c">E</td> <td class="p-3 bc-slate bw-1 bs-d ta-c">F</td> </tr> </tbody></table>Hidden
Hide the element while still taking up space.
A
B
C
<div class="d-g g-4 gtc-1 sm:gtc-3"> <div class="d-f v-h ai-c jc-c w-16 h-16 bg-indigo c-white">A</div> <div class="d-f ai-c jc-c w-16 h-16 bg-indigo c-white">B</div> <div class="d-f ai-c jc-c w-16 h-16 bg-indigo c-white">C</div></div>Responsiveness
Use breakpoint prefixes to target different screen sizes. Styles apply from the breakpoint & up.
Target viewport sizes with breakpoint prefixes.
sm:v-*Small≥640px
md:v-*Medium≥768px
lg:v-*Large≥1024px
xxl:v-*Extra Large≥1536px
Hover State
Apply styles conditionally on hover using the h: prefix.
Add the h: prefix to apply styles only when the user hovers over the element.
Syntax:
h:v-*