Skip to main content
Styling variables (design tokens) are the visual design atoms of the design system — specifically, they are named entities that store visual design attributes. We use tokens instead of hard-coded values to ensure a consistent UI across different platforms.

Color

Brand & primary

Text colors

Border colors

Icon colors

Border radius

Spacing

Size

Typography

Font family

Title X-Large

The quick brown fox jumps over the lazy dog

Title Large

The quick brown fox jumps over the lazy dog

Body Large

The quick brown fox jumps over the lazy dog

Body Medium

The quick brown fox jumps over the lazy dog

Body Small

The quick brown fox jumps over the lazy dog

Border width

Animation

Hover to see animation

Input styling tokens

The hosted input components (primer-input-card-number, primer-input-card-expiry, primer-input-cvv, primer-input-card-holder-name) share a common set of CSS variables for consistent styling. These properties are applied via the primer-input-wrapper component which provides the visual structure.

Input structure

All input components use these tokens for their visual appearance:

Input state colors

Inputs respond to user interaction with different visual states:

Border width by State

Border widths change based on interaction state to provide visual feedback:

Animation

All state transitions use consistent animation:

Example: customizing input appearance


Primitive color tokens

These are the base color values that semantic tokens reference. You typically won’t customize these directly — instead, customize the semantic tokens above which use these as their default values.

Gray scale

Red

Green

Blue