Icon colors

Extended tokens give icons their own color roles when inheriting text color is not enough. Use currentColor in SVGs to pick up the assigned role.

In use

.status-icon {
  color: var(--icon-success);
  fill: currentColor;
}

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

--icon-primary

extendedType: color

Default icon color.

Value: supplied by your design.

--icon-success

extendedType: color

Icon color for success status.

Value: supplied by your design.

--icon-warning

extendedType: color

Icon color for warning status.

Value: supplied by your design.

--icon-danger

extendedType: color

Icon color for danger/error status.

Value: supplied by your design.

--icon-info

extendedType: color

Icon color for informational status.

Value: supplied by your design.

--icon-disabled

extendedType: color

Icon color when the control is disabled.

Value: supplied by your design.

--icon-inverse

extendedType: color

Icon color on inverse or brand-filled surfaces.

Value: supplied by your design.

← All tokens