Design tokens are a way of naming, defining, categorizing, and sharing values
in a design system. Doing so helps us produce uniform user experiences across
platforms and teams. Tokens are defined once using a standard syntax, and can be
transformed by software into a variety of formats and helpers, for multiple platforms.
An example token is
--rh-color-brand-red-on-dark,
the version of “Red Hat red” for use on dark backgrounds.
It has the value #FF442B.
Tokens are for designers and developers. They aid designers
by limiting the pool of available style values to the brand standards and by
standardizing their names and uses. They aid developers in making it
easier to implement the designers’ specification by referencing well-defined token names.
A designer might access the tokens in an XD template or via a figma plugin.
We are researching the best way to make this available across teams and are eager for
feedback.
A developer might use them by referencing preloaded CSS custom properties, using
SCSS variables, or by using editor snippets and lint rules to
auto-complete variable names in CSS files.
We want your feedback
on our tokens! Are there missing values? Do you have an idea for an output format or tool
integration?
Each theme features two shades of blue, one for Link and Focus states and one for Hover
and Active states. Use the --rh-interactive-(blue|purple)-(normal|emphasized) theme
tokens in order to style content of themable containers like <rh-surface>
<rh-surfacecolor-palette="lighter"> <p>Use <ahref="#">theme tokens</a> for best results.<p> <rh-cardcolor-palette="darkest"> <p>That way, colours respond to their parents' <code>color-palette</code> Without requiring <ahref="#">custom CSS</a></p> </rh-card> </rh-surface>
In addition to white and black, each theme features various shades of gray. Be mindful of accessibility when using text or components on top of shades of gray.
Ex.
Token name
Value
Use case
Tertiary surface (light theme)
var(--rh-color-gray-10, #f2f2f2)Copy Link
To modify opacity
var(--rh-color-gray-10, #f2f2f2)Copy Link
To modify opacity
var(--rh-color-gray-10, #f2f2f2)Copy Link
Secondary surface (light theme)
var(--rh-color-gray-20, #e0e0e0)Copy Link
To modify opacity
var(--rh-color-gray-20, #e0e0e0)Copy Link
To modify opacity
var(--rh-color-gray-20, #e0e0e0)Copy Link
Subtle borders (light theme)
var(--rh-color-gray-30, #c7c7c7)Copy Link
To modify opacity
var(--rh-color-gray-30, #c7c7c7)Copy Link
To modify opacity
var(--rh-color-gray-30, #c7c7c7)Copy Link
Subtle icon (hover state)
var(--rh-color-gray-40, #a3a3a3)Copy Link
To modify opacity
var(--rh-color-gray-40, #a3a3a3)Copy Link
To modify opacity
var(--rh-color-gray-40, #a3a3a3)Copy Link
Subtle icon
var(--rh-color-gray-50, #707070)Copy Link
To modify opacity
var(--rh-color-gray-50, #707070)Copy Link
To modify opacity
var(--rh-color-gray-50, #707070)Copy Link
Secondary text (light theme)
var(--rh-color-gray-60, #4d4d4d)Copy Link
To modify opacity
var(--rh-color-gray-60, #4d4d4d)Copy Link
To modify opacity
var(--rh-color-gray-60, #4d4d4d)Copy Link
Tertiary surface (dark theme)
var(--rh-color-gray-70, #383838)Copy Link
To modify opacity
var(--rh-color-gray-70, #383838)Copy Link
To modify opacity
var(--rh-color-gray-70, #383838)Copy Link
Alternative tertiary surface (not available for use with context provider)
var(--rh-color-gray-80, #292929)Copy Link
To modify opacity
var(--rh-color-gray-80, #292929)Copy Link
To modify opacity
var(--rh-color-gray-80, #292929)Copy Link
Secondary surface (dark theme)
var(--rh-color-gray-90, #1f1f1f)Copy Link
To modify opacity
var(--rh-color-gray-90, #1f1f1f)Copy Link
To modify opacity
var(--rh-color-gray-90, #1f1f1f)Copy Link
Primary surface (dark theme) or primary text (light theme)
Red Hat Fonts, designed by Jeremy Mickel
and released under Open Font License, form the typographic basis for the Red Hat Design
System. Pages using non-latin characters should fall back to
Noto Sans. By loading language-specific Noto
Sans fonts, RHDS can accomodate mixed-language
content including العربية, עברית,
日本語, 조선말, മലയാളം,
汉语, 漢語, or ภาษาไทย.
Users may load those fonts from Google Fonts, for example with this HTML snippet pasted
into the <head>:
Spacers are visual cues used to define fixed amounts of space between elements. They make it easy for designers to maintain consistent spacing across components and patterns as well as simplify the handoff process between designers and developers. Consistent spacing helps maintain balance and rhythm across the system.
When layouts change in size responding to screen size, visual elements may
adjust their
size, hide, or otherwise adapt to compensate for gains or losses in screen real estate.
Red Hat's breakpoint tokens represent the minimumCSS pixel width of a device's
screen, corresponding to the min-width media query so for example a device with a
screen width less than the --rh-breakpoint-xs token is considered a mobile
device in portrait mode, whereas a device with a screen width greater than the
--rh-breakpoint-xl token is considered a desktop with a large screen.
Since CSS currently does not allow custom properties in media queries, these tokens must be
uses in preprocessors or templating systems, or imported into JavaScript modules. We
recommend against importing these token values directly into components. In Red Hat's
Design System, we import them into a
reactive controller which exposes
information about the screen size through a JavaScript API.
For use in templating systems and JavaScript modules. We recommend against
importing tokens
directly into components. These are directly derived from breakpoints.