Patterns

Dots v1.0.8

Utilities for sets an element's background dots pattern.


Class

classcss
pattern
dots-sm
background-image: radial-gradient(currentColor 5px, transparent 5px);

background-size: calc(10 * 5px) calc(10 * 5px)
pattern
dots-md
background-image: radial-gradient(currentColor 1px, transparent 1px);

background-size: calc(10 * 1px) calc(10 * 1px)
pattern
dots-lg
background-image: radial-gradient(currentColor 1.5px, transparent 1.5px);

background-size: calc(10 * 1.5px) calc(10 * 1.5px)
pattern
dots-xl
background-image: radial-gradient(currentColor 2px, transparent 2px);

background-size: calc(10 * 2px) calc(10 * 2px)
Note: Utility customizing is unavailable.

Usage

Set basic dots pattern.

<!-- Example -->
<y class="pattern dots-sm ... h-32 w-full">
...
</y>

Set pattern with color by using text-{color} utility. (See Text Color).

<!-- Example -->
<y class="pattern dots-sm text-amber-400 ... h-32 w-full">
...
</y>

Set pattern clipping with text.

TEXT
<!-- Example -->
<y class="pattern dots-sm clip-text text-red-500">
<y>
TEXT
</y>
</y>

Variant

VariantEnabledResponsive
DefaultYes
Dark Theme
hover
group-hover
focus
focus-within
active
visited
checked
disabled