2.0 alpha
These docs describe 2.0. Install it with @once-ui-system/core@alpha.
On 1.8.x? Read the 1.x docs
TrademarkTrademarkDocs
Ctrl k
Search 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. Create beautiful gradient backgrounds with customizable position, size, and colors. Add a dotted pattern to your backgrounds with customizable size, color, and opacity. Create grid backgrounds with customizable color, opacity, and dimensions. Add diagonal or straight lines to your backgrounds with customizable angle, thickness, and spacing. Combine multiple background effects to create unique and visually interesting backgrounds. Create a spotlight or reveal effect with the mask property.
Prop
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
Prop
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)
Prop
Type
Default
display
booleanfalse
opacity
number1
color
stringbrand-on-background-weak
size
SpacingToken24
Prop
Type
Default
display
booleanfalse
opacity
number1
color
stringneutral-medium
width
string32px
height
string32px
Prop
Type
Default
display
booleanfalse
opacity
number1
size
SpacingToken24
thickness
number1
angle
number0
color
stringneutral-medium
Prop
Type
Default
cursor
string
x
number
y
number
radius
number50
Edit this page on GitHub
TrademarkTrademark
Built with curiosity by Lorant One and the Design Engineers Club