This is a preview, you can find the current version here.
Last updated: 12/5/2025

Backgrounds

Atomic classes for controlling the background properties of an element’s background image.

Background size

ClassOutput
.bg-autobackground-size: auto;
.bg-coverbackground-size: cover;
.bg-containbackground-size: contain;

Background repeat

ClassOutput
.bg-repeatbackground-repeat: repeat;
.bg-no-repeatbackground-repeat: no-repeat;
.bg-repeat-xbackground-repeat: repeat-x;
.bg-repeat-ybackground-repeat: repeat-y;

Background position

ClassOutput
.bg-bottombackground-position: bottom;
.bg-centerbackground-position: center;
.bg-leftbackground-position: left;
.bg-left-bottombackground-position: left bottom;
.bg-left-topbackground-position: left top;
.bg-rightbackground-position: right;
.bg-right-bottombackground-position: right bottom;
.bg-right-topbackground-position: right top;
.bg-topbackground-position: top;

Background position examples

<div class="bg-no-repeat bg-bottom"></div>
<div class="bg-no-repeat bg-center"></div>
<div class="bg-no-repeat bg-left"></div>
<div class="bg-no-repeat bg-left-bottom"></div>
<div class="bg-no-repeat bg-left-top"></div>
<div class="bg-no-repeat bg-right"></div>
<div class="bg-no-repeat bg-right-bottom"></div>
<div class="bg-no-repeat bg-right-top"></div>
<div class="bg-no-repeat bg-top"></div>
.bg-bottom
.bg-center
.bg-left
.bg-left-bottom
.bg-left-top
.bg-right
.bg-right-bottom
.bg-right-top
.bg-top

Background attachment

ClassOutput
.bg-fixedbackground-attachment: fixed;
.bg-localbackground-attachment: local;
.bg-scrollbackground-attachment: scroll;

Background image

ClassOutput
.bg-image-nonebackground-image: none;

Background utilities

Confetti

Adding the confetti background utility adds confetti to any block-level element. You can choose the animated version, or static version. The animated version respects prefers-reduced-motion and displays the static version of the background when necessary. No JavaScript required.

<div class="bg-confetti-animated"></div>
<div class="bg-confetti-static"></div>

Animated

Static

Edit on GitHub