DocsBlog

Get Started

Components

Data Grid

Signals

Styling

Theming

↑↓Navigate
↵Select
EscClose
  • 1.8.0

  • Day

    Night

    Preview

    Switch mode
  • cerberus

    acheron

    elysium

    oceanus

Get Started
Components
Data Grid
Signals
Styling
Theming

Concepts

Cerberus FactoryResponsive DesignCSS VariablesThemes & Color ModesColor opacity modifierConditional StylesVirtual ColorCascade LayersUtilities

Compositions

Animation StylesLayer StylesText Styles

Style Props

BackgroundBorderEffectsSpacingText GradientTransitionsz-index

Background

JSX style props for styling background colors, gradients, and images.

  • source
View as Markdown
Open this page in Markdown
Anthropic
Open in Claude
Ask questions about this page
OpenAI
Open in ChatGPT
Ask questions about this page

Background Attachment

Use bgAttachment to control the attachment of a background image.

<Box bgAttachment="fixed" bgImage="url(...)" />
PropCSS PropertyToken Category
bgAttachment, backgroundAttachmentbackground-attachment-

Background Blend Mode

Use bgBlendMode prop to control how an element's background image should blend with the its background color.

<Box bgBlendMode="multiply" bgColor="red.200" bgImage="url(...)" />

Background Clip

Use bgClip to control the clipping of a background image.

<Box bgClip="border-box" bgImage="url(...)" />
PropCSS PropertyToken Category
bgClip, backgroundClipbackground-clip-

Background Color

Use bg, bgColor, or backgroundColor props to set the background color of an element.

<Box bg="red.200" />
<Box bgColor="red.200" />
 
// with opacity modifier
<Box bg="blue.200/30" />
<Box bgColor="blue.200/30" />
PropCSS PropertyToken Category
bg, backgroundbackgroundcolors
bgColor, backgroundColorbackground-colorcolors

Background Origin

Use bgOrigin or backgroundOrigin to control the origin of a background image.

<Box bgOrigin="border-box" bgImage="url(...)" />
PropCSS PropertyToken Category
bgOrigin, backgroundOriginbackground-origin-

Background Position

Properties for controlling the src and position of a background image.

<Box bgImage="url(...)" bgPosition="center" />
PropCSS PropertyToken Category
bgPosition, backgroundPositionbackground-image-
bgPositionX, backgroundPositionXbackground-image-
bgPositionY, backgroundPositionYbackground-image-

Background Repeat

Use bgRepeat or backgroundRepeat to control the repeat of a background image.

<Box bgRepeat="no-repeat" bgImage="url(...)" />
PropCSS PropertyToken Category
bgRepeat, backgroundRepeatbackground-repeat-

Background Size

Use bgSize or backgroundSize to control the size of a background image.

<Box bgSize="cover" bgImage="url(...)" />
PropCSS PropertyToken Category
bgSize, backgroundSizebackground-size-

Background Image

Use bgImage or backgroundImage to set the background image of an element.

<Box bgImage="url(...)" />
<Box bgImage="radial-gradient(circle, #0000 45%, #000f 48%)" />
<Box bgImage="linear-gradient(black, white)" />
 
// with token reference
<Box bgImage="linear-gradient({colors.red.200}, {colors.blue.200})" />
PropCSS PropertyToken Category
bgImage, backgroundImagebackground-imageassets, gradients

Background Gradient

Properties to create a background gradient based on color stops.

<Box bgGradient="to-r" gradientFrom="red.200" gradientTo="blue.200" />
PropCSS PropertyToken Category
bgGradientbackground-imagegradients
textGradientbackground-imagegradients
gradientFrom--gradient-fromcolors
gradientTo--gradient-tocolors
gradientVia--gradient-viacolors

On this page

  • Background Attachment
  • Background Blend Mode
  • Background Clip
  • Background Color
  • Background Origin
  • Background Position
  • Background Repeat
  • Background Size
  • Background Image
  • Background Gradient
Edit this page on Github