Color variable support for card view buttons

reference brazil Updated Sep 10, 2026 1 min read color-var-cardview-button.md
Raw file servicenow.com

Learn how to use color variables to change theming in your mobile card view buttons.

Use color variables in Card template element attributes to control color values for icon buttons on your mobile cards.

The following color variables are available to use:

  • BackgroundColorVariable
  • BorderColorVariable
  • TextColorVariable

For more information on these attributes, see Card template element attributes.

[Omitted image "color-var-example-6.png"] Alt text: Color variable used in a card view template element

## Button style guide

Color

Example

Variables

Primary

[Omitted image "button-primary.png"] Alt text: Primary button example

  • Background

Mobile variable: Primary

Web variable: now-color--primary-1

  • Text

Mobile variable: Text Actionable

Web variable: now-color_text--primary-actionable

Secondary

[Omitted image "button-secondary.png"] Alt text: Secondary button example

  • Background

Mobile variable: Background Primary

Web variable: now-color_background--primary

  • Text

Mobile variable: Primary

Web variable: now-color--primary-1

  • Border (2px)

Mobile variable: Primary

Web variable: now-color--primary-1

Positive

[Omitted image "button-positive.png"] Alt text: Positive button example

  • Background

Mobile variable: Positive

Web variable: now-color_alert--positive-3

  • Text

Mobile variable: Text Actionable

Web variable: now-color_text--primary-actionable

Destructive

[Omitted image "button-destructive.png"] Alt text: Destructive button example

  • Background

Mobile variable: Destructive

Web variable: now-color_alert--critical-3

  • Text

Mobile variable: Text Actionable

Web variable: now-color_text--primary-actionable

Bare

[Omitted image "button-bare.png"] Alt text: Bare button example

  • Background

Mobile variable: Primary/Positive/Destructive

Web variable: now-color--primary-1/

now-color_alert--positive-3/

now-color_alert--critical-3

  • Text

Mobile variable: Text Actionable

Web variable: now-color_text--primary-actionable

Note: This button can be configured with primary, positive, or destructive color.

Disabled

[Omitted image "button-disabled.png"] Alt text: Disabled button example

Use this style when the action is unavailable while offline.

Can be used with all styles- primary, secondary, text/icon.

Search documentation
Search document titles and file paths on the brazil branch