Skip to content
TrademarkTrademark
Docs
Components

Background

Updated: May 8, 2025
View on GitHub

A versatile component for creating decorative backgrounds with various visual effects. Commonly used to add visual interest to sections, cards, or containers while maintaining a clean and modern aesthetic.

Gradient

Create beautiful gradient backgrounds with customizable position, size, and colors.

Dots

Add a dotted pattern to your backgrounds with customizable size, color, and opacity.

Grid

Create grid backgrounds with customizable color, opacity, and dimensions.

Lines

Add diagonal or straight lines to your backgrounds with customizable angle, thickness, and spacing.

Stacking

Combine multiple background effects to create unique and visually interesting backgrounds.

Mask

Create a spotlight or reveal effect with the mask property.

API reference

Background Props

Type
Default
gradient
A radial or linear wash: position, size, colours and opacity.
GradientProps{}
dots
A dot field: colour, size and spacing.
DotsProps{}
grid
A grid: colour, line width and cell size.
GridProps{}
lines
Diagonal lines: colour, angle, thickness and spacing.
LinesProps{}
mask
Fade the whole layer through a shape or toward the cursor.
MaskProps—
className
string—
style
React.CSSProperties—
children
React.ReactNode—
…and every FlexProps propinherited—

GradientProps

Type
Default
display
booleanfalse
opacity
number1
x
number50
y
number50
width
number100
height
number100
tilt
number0
colorStart
stringvar(--color-brand-medium)
colorEnd
stringvar(--color-success-medium)

DotsProps

Type
Default
display
booleanfalse
opacity
number1
color
stringbrand-on-background-weak
size
SpacingToken24

GridProps

Type
Default
display
booleanfalse
opacity
number1
color
stringneutral-medium
width
string32px
height
string32px

LinesProps

Type
Default
display
booleanfalse
opacity
number1
size
SpacingToken24
thickness
number1
angle
number0
color
stringneutral-medium

MaskProps

Type
Default
cursor
string—
x
number—
y
number—
radius
number50
Edit this page on GitHub