Surfaces

Give each surface a role, from the page canvas to raised cards and inset fields. Map these roles to your own palette, and choose text colors for the surface they appear on.

In use

.card {
  background: var(--bg-raised);
  color: var(--text-primary);
}

These examples show how to consume the tokens. Assign values before using them.

--bg-body

coreType: color

Page or application canvas behind main content.

Use for: html/body background

Value: supplied by your design.

--bg-main

coreType: color

Primary content surface.

Use for: main column, article, panel

Value: supplied by your design.

--bg-inset

coreType: color

Recessed surface below the main background.

Use for: asides, wells, form fields, inputs

Value: supplied by your design.

--bg-raised

coreType: color

Surface elevated above the main background.

Use for: cards, menus, dropdowns, raised panels

Value: supplied by your design.

--bg-inset-strong

extendedType: color

Deeper inset than inset when two recessed levels are needed.

Value: supplied by your design.

--bg-raised-strong

extendedType: color

Stronger elevation than raised when two raised levels are needed.

Value: supplied by your design.

--bg-brand

coreType: color

Background filled with the primary brand color.

Use for: call-to-action buttons

Value: supplied by your design.

--bg-brand-secondary

coreType: color

Background filled with a secondary brand color.

Value: supplied by your design.

--bg-success

coreType: color

Background for success state regions.

Use for: banners, badges

Value: supplied by your design.

--bg-warning

coreType: color

Background for warning state regions.

Value: supplied by your design.

--bg-danger

coreType: color

Background for danger/error state regions.

Value: supplied by your design.

--bg-info

coreType: color

Background for informational state regions.

Value: supplied by your design.

--bg-disabled

coreType: color

Background for disabled controls or inert regions.

Value: supplied by your design.

--bg-inverse

coreType: color

Contrasting surface inverted from the current theme (e.g. dark on light themes).

Value: supplied by your design.

← All tokens