--- name: visual-background description: Background color, gradient, image, and attachment utilities --- # Background Utilities for background color, gradients, images, and attachment. ## Usage ### Background color ```html
White
Light gray
Blue
50% opacity
Arbitrary
CSS variable
``` Color palette follows theme (red, orange, amber, yellow, lime, green, emerald, teal, cyan, sky, blue, indigo, violet, purple, fuchsia, pink, rose, slate, gray, zinc, neutral, stone). ### Background image and gradient ```html
Linear gradient
Multi-stop
Image
Image with size/position
``` Gradient directions: `to-t`, `to-tr`, `to-r`, `to-br`, `to-b`, `to-bl`, `to-l`, `to-tl`. ### Background size and position ```html
auto
cover
contain
center
top
bottom
left
right
Arbitrary
``` ### Background repeat and attachment ```html
repeat (default)
no-repeat
repeat-x
fixed (parallax)
local
scroll
``` ## Key Points - Colors: `bg-{color}-{shade}`, opacity `/50`, arbitrary `bg-[#hex]` - Gradients: `bg-gradient-to-{dir}`, `from-*`, `via-*`, `to-*` - Image: `bg-[url('...')]`, `bg-cover`, `bg-center`, etc. - Size: `bg-auto`, `bg-cover`, `bg-contain` - Position: `bg-center`, `bg-top`, `bg-[position:...]`