Background

The background kit is used for adding a background to a page or to any container. Instead of adding a custom class to give something a background, you can now wrap the elements in the background kit and use the background_color prop to assign its color. The colors that you can choose from for the background_color prop are: gradient, dark, light, white, status colors, product colors, and category colors.

The custom_color prop allows you to pass a hex value (ex. "#e43718") in place of background_color. It is not case sensitive, but needs to start with #. This prop exists primarily for use in microsites and very specific situations. Avoid using unless absolutely necessary to maintain continuity.

Default


By default, the Background kit sets background color to 'light' as seen here.

White


Gradient


Image

Background Kit Image

We cannot seek achievement for ourselves and forget about progress and prosperity for our community... Our ambitions must be broad enough to include the aspirations and needs of others, for their sakes and for our own. -Cesar Chavez

To add a lazyload on the background image simply use the transition prop and one of the three string options "fade", "blur", or "scale".

Status













Status colors can be passed into the background kit. success, success_secondary, warning, warning_secondary, error, error_secondary, info, info_secondary, neutral, neutral_secondary, primary, and primary_secondary

Status Subtle






Status Subtle colors can be passed into the background kit. success_subtle, warning_subtle,error_subtle, info_subtle and neutral_subtle

Category


Category colors can be passed into the background kit. Values category_1 to category_21 are accepted. List of all category and status colors can be viewed here.

Size




Background size can be passed into the background kit. Values auto, cover, and contain are accepted.

💡 Note: When using contain you might not want to have a repeating background as this will not always look pleasant. To prevent this, you may pass no-repeat to the backgroundRepeat prop.



Available Props

Props Type Values

align_content

enum | responsive
start
end
center
spaceBetween
spaceAround
spaceEvenly

align_items

enum | responsive
start
end
center

border_radius

enum
none
xs
sm
md
lg
xl
rounded

cursor

enum
auto
default
none
contextMenu
help
pointer
progress
wait
cell

dark

boolean
true
false

flex

enum | responsive
auto
initial
0
1
2
3
4
5
6
7
8
9
10
11
12
none

flex_direction

enum | responsive
row
column
rowReverse
columnReverse

flex_wrap

enum | responsive
wrap
nowrap
wrapReverse

justify_content

enum | responsive
start
end
center
spaceBetween
spaceAround
spaceEvenly

line_height

enum
loosest
looser
loose
normal
tight
tighter
tightest

margin_right

array
none
xxs
xs
sm
md
lg
xl

margin_left

array
none
xxs
xs
sm
md
lg
xl

margin_top

array
none
xxs
xs
sm
md
lg
xl

margin_bottom

array
none
xxs
xs
sm
md
lg
xl

margin_x

array
none
xxs
xs
sm
md
lg
xl

margin_y

array
none
xxs
xs
sm
md
lg
xl

margin

array
none
xxs
xs
sm
md
lg
xl

width

string

min_width

string

max_width

string

gap

string | responsive

column_gap

string | responsive

row_gap

string | responsive

number_spacing

enum
tabular

order

enum | responsive
none
first
1
2
3
4
5
6
7
8
9
10
11
12

overflow_x

enum
scroll
visible
hidden
auto

overflow_y

enum
scroll
visible
hidden
auto

overflow

enum
scroll
visible
hidden
auto

padding_right

array
none
xxs
xs
sm
md
lg
xl

padding_left

array
none
xxs
xs
sm
md
lg
xl

padding_top

array
none
xxs
xs
sm
md
lg
xl

padding_bottom

array
none
xxs
xs
sm
md
lg
xl

padding_x

array
none
xxs
xs
sm
md
lg
xl

padding_y

array
none
xxs
xs
sm
md
lg
xl

padding

array
none
xxs
xs
sm
md
lg
xl

position

enum
relative
absolute
fixed
sticky
static

shadow

enum
none
deep
deeper
deepest

text_align

enum | responsive
start
end
left
right
center
justify
justifyAll
matchParent

truncate

enum
none
1
2
3
4
5

vertical_align

enum | responsive
baseline
super
top
middle
bottom
sub
text-top
text-bottom

z_index

enum | responsive
1
2
3
4
5
6
7
8
9
10
max

top

enum | object
xxs
xs
sm
md
lg
xl
xxl

inset

boolean
true
false

right

enum | object
xxs
xs
sm
md
lg
xl
xxl

bottom

enum | object
xxs
xs
sm
md
lg
xl
xxl

left

enum | object
xxs
xs
sm
md
lg
xl
xxl

height

string

max_height

string

min_height

string

hover

object

group_hover

boolean
true
false
Props Type Values Default

alt

string

background_color

responsiveprop<backgroundcolors> | backgroundcolors
gradient
dark
light
white
success
warning
error
info
neutral
primary
shadow
category_1
category_2
category_3
category_4
category_5
category_6
category_7
category_8
category_9
category_10
category_11
category_12
category_13
category_14
category_15
category_16
category_17
category_18
category_19
category_20
category_21
success_secondary
error_secondary
info_secondary
warning_secondary
neutral_secondary
primary_secondary
text_lt_default
text_lt_light
text_lt_lighter
text_dk_default
text_dk_light
text_dk_lighter
card_light
card_dark
data_1
data_2
data_3
data_4
data_5
data_6
data_7
data_8
border_light
border_dark
success_subtle
warning_subtle
error_subtle
info_subtle
neutral_subtle
light

background_size

responsiveprop<backgroundsizes> | backgroundsizes
contain
cover
auto
cover

background_position

responsiveprop<string> | string

background_repeat

responsiveprop<backgroundrepeat> | backgroundrepeat
repeat
repeat-x
repeat-y
no-repeat
space
round
initial
inherit
initial

image_url

responsiveprop<string> | string

image_overlay

enum
opacity_1
opacity_2
opacity_3
opacity_4
opacity_5
opacity_6
opacity_7
opacity_8
opacity_9
opacity_10

custom_color

string

tag

enum
h1
h2
h3
h4
h5
h6
p
span
div
tr
th
td
thead
col
div

transition

enum
fade
blur
scale