Design tokens
Named entities that store visual design attributes in place of hard-coded values
What are design tokens?
Design tokens are abstractions of visual properties – such as color, font, width, etc –- agnostic of platforms and programming languages. Generated as:
- Sass/SCSS for web
- CSS Custom Properties for web
- JSON for iOS/Sketch
- XML for Android
This allows for a sharing of a centralized system of specifications across all platforms. Just include the variables or data file in your build and replace any specs with the properly named token.
Other companies that use design tokens
- Salesforce
- Amazon
- AirBNB
- Adobe
- Shopify
- Github
- OpenTable
- Spotify
- Mozilla
- Etsy
- CVS Health
Base values vs. global settings vs. pattern-specific tokens
Base values
Base values are the bottom-line values that feed all others. These are the core specs that feed the very foundations that all other patterns and specifications are built upon. These are usually not accessible as tokens, but are rather set by the Design System team and feed into the tokens library as aliases. Exceptions apply in come cases for legacy code. Examples include:
- COLOR_BRAND The primary brand color (accessible as a token as SDS_COLOR_BRAND).
- GLOBAL_BORDER_COLOR Provides the color used globally for all borders, unless overridden at the pattern level.
- COLOR_BACKGROUND_BANDING Sets the global color for page-section banding.
Global settings
Use global tokens when setting site-wide values that should not change from page-to-page. For example, specs like font-family, default text color, page-section margin and padding values, and brand colors. Examples include:
- SDS_GLOBAL_FONT_FAMILY_DEFAULT (currently set to
"Inter var", Helvetica, Arial, sans-serif) for the global default font stack. - SDS_GLOBAL_TEXT_COLOR (currently set to #212121) for the global default text color.
- SDS_COLOR_BRAND (currently set to #532380) for the global default primary brand color.
Pattern-specific tokens
Use pattern-specific tokens when applying specs to a base pattern. These values map to global values and can be safely overridden at the pattern, module or page level as needed without affecting the global values. Examples for when a token value could be changed would include contextual styling (on light and dark backgrounds), extending patterns for testing, and any new situation where the global value breaks the experience or doesn’t fit. Examples:
- SDS_ACCORDION_HEADER_BACKGROUND_COLOR (currently set to #e6e6e6) for the background color of an active accordion area header.
- SDS_NOTIFICATION_ICON_MARGIN (currently set to
0 16px 0 0) for the margin around an alert icon. - SDS_MODAL_OVERLAY_OPACITY (currently set to
0.65) for the opacity of a modal overlay background.
Token hierarchy
As an example of token hierarchy, let’s look at a Button. The following aliases and tokens apply to a button’s background-color:
- STRONG_MAGENTA (alias) This alias is the literal name of this color. This allows us to maintain a list of color names that remain unassociated or tied to specific usage. If a new color comes in as part of a brand refresh, we just add it to the list.
- COLOR_BRAND_LIGHTER (alias) This alias allows us to assign a color from the master list as a brand color. As of this writing, the value is set to “STRONG_MAGENTA”. For the brand refresh scenario, we just update this token value with the new color.
- SDS_BUTTON_BACKGROUND_COLOR (token) This token is available to designers and developers, and should be used in all references. Its assigned value (as of this writing) is “COLOR_BRAND_LIGHTER” for the default pattern, set by the Design System team at the brand level. This can be overwritten if needed, but should not be to maintain consistency.
Available design token list
These tokens names have been converted to their Sass/SCSS equivalents. Individual Components list their respective tokens in the Specs area.
Global
Global typography
$sds-global-font-family-default"Inter var", Helvetica, Arial, sans-serif$sds-global-font-family-default-alt"Inter var alt", Helvetica, Arial, sans-serif$sds-global-font-family-heading"Sharp Sans Display 1", Helvetica, Arial, sans-serif$sds-global-font-size16px$sds-global-font-size-larger18px$sds-global-font-size-small14px$sds-global-font-size-smaller12px$sds-global-font-weight-bold700$sds-global-font-weight-light300$sds-global-font-weight-normal400$sds-global-font-weight-semi-bold600$sds-global-text-color#212121$sds-global-text-color-disabled#767676$sds-global-text-color-inverse#ffffff$sds-global-text-color-inverse-weak#959595$sds-global-text-color-weak#555555$sds-global-text-line-height1.5
Global colors
$blackDeprecated#212121$darker-grayDeprecated#555555$dark-grayDeprecated#767676$grayDeprecated#959595$lighter-grayDeprecated#e6e6e6$light-grayDeprecated#bdbdbd$sds-alert-color-error#cc1100$sds-alert-color-notification#5c707c$sds-alert-color-success#93a533$sds-alert-color-warning#dfa20b$sds-color-brand#532380$sds-color-brand-accent#00BFDE$sds-color-brand-dark#250858$sds-color-brand-lighter#bb00cc$sds-color-shade-black#212121$sds-color-shade-darker-gray#555555$sds-color-shade-dark-gray#767676$sds-color-shade-gray#959595$sds-color-shade-lighter-gray#e6e6e6$sds-color-shade-light-gray#bdbdbd$sds-color-shade-true-black#000000$sds-color-shade-very-light-gray#f2f2f2$sds-color-shade-white#ffffff$sds-color-theme-pricing#aed622$sds-color-theme-sponsored#212121$sds-global-icon-color#212121$sds-global-icon-color-inverse#ffffff$sds-social-color-facebook#1778F2$sds-social-color-google#bd081c$sds-social-color-pinterest#dc4e41$sds-social-color-twitter#55acee$true-blackDeprecated#000000$very-light-grayDeprecated#f2f2f2$whiteDeprecated#ffffff
Global base values
$sds-global-breakpoint-desktop980px$sds-global-breakpoint-desktop-plus1170px$sds-global-breakpoint-modern375px$sds-global-breakpoint-phablet504px$sds-global-breakpoint-tablet768px$sds-global-gutter-size16px$sds-global-spacing-break56px$sds-global-spacing-large24px$sds-global-spacing-medium16px$sds-global-spacing-micro8px$sds-global-spacing-small14px$sds-global-spacing-xlarge32px
Pattern-specific
Accordions
$sds-accordion-content-padding16px$sds-accordion-header-background-color#e6e6e6$sds-accordion-header-height-min48px$sds-accordion-header-padding16px 56px 16px 16px$sds-accordion-section-border-color#e6e6e6$sds-accordion-section-border-size1px$sds-accordion-section-border-stylesolid
Author
$sds-author-border-color#e6e6e6$sds-author-border-stylesolid$sds-author-border-width1px$sds-author-caption-margin16px$sds-author-caption-max-width85ch$sds-author-caption-max-width-tablet35em$sds-author-font-size14px$sds-author-padding24px 16px$sds-author-padding-desktop24px 0
Badge
$sds-badge-background-color#e6e6e6$sds-badge-background-color-sponsored#ffffff$sds-badge-background-color-sponsored-ga#212121$sds-badge-border-radius4px$sds-badge-height24px$sds-badge-icon-background-color#250858$sds-badge-icon-block-height24px$sds-badge-icon-block-scalescale(1.5)$sds-badge-icon-block-width24px$sds-badge-icon-border-radius4px 0 0 4px$sds-badge-icon-fill#ffffff$sds-badge-icon-margin0 6px 0 0$sds-badge-icon-padding0 6px 0 0$sds-badge-icon-width10px$sds-badge-label-color#250858$sds-badge-label-color-inverse#ffffff$sds-badge-label-font-size12px$sds-badge-label-font-weight700$sds-badge-margin8px$sds-badge-padding0 6px
Breadcrumb
$sds-breadcrumb-font-size14px$sds-breadcrumb-icon-color#000000$sds-breadcrumb-icon-color-inverse#ffffff$sds-breadcrumb-icon-size1em$sds-breadcrumb-link-color#555555$sds-breadcrumb-separator-color#555555
Button-list
$sds-button-list-arrow-size12px$sds-button-list-drawer-background-color#ffffff$sds-button-list-drawer-border-color#e6e6e6$sds-button-list-drawer-border-size1px$sds-button-list-drawer-border-stylesolid$sds-button-list-drawer-close-color#555555$sds-button-list-drawer-close-position8px$sds-button-list-drawer-close-size12px$sds-button-list-drawer-padding32px 16px 16px$sds-button-list-icon-fill#ffffff$sds-button-list-icon-fill-facebook#1778F2$sds-button-list-icon-fill-pinterest#dc4e41$sds-button-list-icon-fill-twitter#55acee$sds-button-list-item-margin8px$sds-button-list-label-color#212121$sds-button-list-label-size16px$sds-button-list-label-weight400$sds-button-list-zindex9999
Buttons
$sds-button-background-color#532380$sds-button-background-color-disabled#e6e6e6$sds-button-background-color-hover#250858$sds-button-background-color-inverse-hover#ffffff$sds-button-background-color-secondary#ffffff$sds-button-background-color-secondary-hover#250858$sds-button-border-color-inverse-hover#ffffff$sds-button-border-color-secondary#532380$sds-button-border-color-secondary-hover#532380$sds-button-border-radius6px$sds-button-border-size-secondary2px$sds-button-border-style-secondarysolid$sds-button-color#ffffff$sds-button-color-disabled#ffffff$sds-button-color-hover#ffffff$sds-button-color-inverse#212121$sds-button-color-secondary#532380$sds-button-color-secondary-disabled#e6e6e6$sds-button-color-secondary-hover#ffffff$sds-button-font-size16px$sds-button-font-size-dense14px$sds-button-font-size-medium14px$sds-button-font-weight700$sds-button-height56px$sds-button-height-dense32px$sds-button-height-medium40px$sds-button-icon-svg-width50%$sds-button-line-height16px$sds-button-margin0 auto$sds-button-max-width250px$sds-button-max-width-fluid503px$sds-button-padding0 32px$sds-button-padding-dense8px 16px$sds-button-text-aligncenter$sds-button-width80%$sds-button-width-denseauto$sds-button-width-fluid100%$sds-button-width-icon40px$sds-button-width-tabletauto
Caption
$sds-caption-color#212121$sds-caption-credit-border-color#e6e6e6$sds-caption-credit-border-stylesolid$sds-caption-credit-border-width1px$sds-caption-credit-color#959595$sds-caption-credit-font-size12px$sds-caption-credit-font-size-tablet12px$sds-caption-credit-font-stylenormal$sds-caption-credit-font-weight400$sds-caption-credit-line-height1.13$sds-caption-credit-margin8px 0 0$sds-caption-credit-padding8px 0 0$sds-caption-font-size14px$sds-caption-font-styleitalic$sds-caption-font-weight400$sds-caption-line-height1.25$sds-caption-margin24px 0 0$sds-caption-padding0
Checkbox
$sds-checkbox-background-color#ffffff$sds-checkbox-background-color-active#212121$sds-checkbox-background-size65%$sds-checkbox-border-color#bdbdbd$sds-checkbox-border-color-active#212121$sds-checkbox-border-color-disabled#e6e6e6$sds-checkbox-border-color-error#cc1100$sds-checkbox-border-radius4px$sds-checkbox-border-stylesolid$sds-checkbox-border-width1px$sds-checkbox-height20px$sds-checkbox-label-color#212121$sds-checkbox-label-color-disabled#767676$sds-checkbox-label-color-error#cc1100$sds-checkbox-label-font-size16px$sds-checkbox-label-line-height1.25$sds-checkbox-label-padding0 0 0 32px$sds-checkbox-margin16px$sds-checkbox-width20px
Container
$sds-container-card-background-color#ffffff$sds-container-card-border-color#e6e6e6$sds-container-card-border-stylesolid$sds-container-card-border-width1px$sds-container-card-margin24px$sds-container-card-padding16px$sds-container-card-shadow-blur0$sds-container-card-shadow-color#f2f2f2$sds-container-card-shadow-offset-x0$sds-container-card-shadow-offset-y2px$sds-container-card-shadow-spread0$sds-container-card-text-color#212121
Disclaimer
$sds-disclaimer-color#555555$sds-disclaimer-color-inverse#959595$sds-disclaimer-font-size11px$sds-disclaimer-line-height1.25$sds-disclaimer-link-color#bb00cc$sds-disclaimer-link-text-decoration-inverseunderline$sds-disclaimer-max-width85ch$sds-disclaimer-max-width-tablet35em
Dropdown
$sds-dropdown-icon-fill#212121$sds-dropdown-icon-height16px$sds-dropdown-icon-position-right16px$sds-dropdown-icon-width16px
Filter
$sds-filter-background-color#e6e6e6$sds-filter-background-color-hover#555555$sds-filter-border-radius4px$sds-filter-color#212121$sds-filter-color-hover#ffffff$sds-filter-font-size14px$sds-filter-height32px$sds-filter-icon-fill#212121$sds-filter-icon-fill-hover#ffffff$sds-filter-icon-height8px$sds-filter-icon-margin0 8px 0 0$sds-filter-icon-width8px$sds-filter-margin0 12px 0 0$sds-filter-padding0 8px$sds-filter-sort-background-color-active#555555$sds-filter-sort-color-active#ffffff$sds-filter-sort-color-active-hover#ffffff$sds-filter-sort-icon-fill-active#ffffff
Headshot
$sds-headshot-border-radius50%$sds-headshot-height64px$sds-headshot-margin16px$sds-headshot-max-width176px$sds-headshot-width64px
Helper-text
$sds-helper-text-color#555555$sds-helper-text-color-error#cc1100$sds-helper-text-color-inversecurrentColor$sds-helper-text-font-size14px$sds-helper-text-margin8px 0 0
Label
$sds-label-color#555555$sds-label-color-error#cc1100$sds-label-font-size16px$sds-label-font-size-focus12px$sds-label-font-size-optional14px$sds-label-margin-optional0 0 0 8px$sds-label-position-left16px$sds-label-position-top16px$sds-label-transform-focustranslate3d(0, -10px, 0)
Link
$sds-link-color#bb00cc$sds-link-color-active#532380$sds-link-color-hover#532380$sds-link-color-hover-active#532380$sds-link-color-inverse#ffffff$sds-link-color-inverse-hover#ffffff$sds-link-color-inverse-hover-active#ffffff$sds-link-color-inverse-visited#ffffff$sds-link-color-visited#532380$sds-link-icon-margin0 0.5em 0 0$sds-link-outline-focus1px dotted #767676$sds-link-text-decorationnone$sds-link-text-decoration-hoverunderline$sds-link-text-decoration-hover-inverseunderline$sds-link-text-decoration-inverseunderline
Lists
$sds-list-bullet-color-unordered#00BFDE$sds-list-item-bullet-line-height1rem$sds-list-item-bullet-position-16px$sds-list-item-bullet-size21px$sds-list-item-margin16px 0 0$sds-list-line-height1.25$sds-list-padding-bulleted0 0 0 24px$sds-list-style-ordereddecimal
Modal
$sds-modal-content-background-color#ffffff$sds-modal-content-body-color#212121$sds-modal-content-body-desc-margin0 0 16px$sds-modal-content-body-height-min208px$sds-modal-content-body-margin0 0 16px$sds-modal-content-body-padding0 32px$sds-modal-content-border-color#e6e6e6$sds-modal-content-border-size1px$sds-modal-content-border-stylesolid$sds-modal-content-header-icon-color#959595$sds-modal-content-header-icon-height24px$sds-modal-content-header-icon-hover-background-color#f2f2f2$sds-modal-content-header-icon-hover-color#555555$sds-modal-content-header-icon-target-height40px$sds-modal-content-header-icon-target-padding8px$sds-modal-content-header-icon-target-width40px$sds-modal-content-header-icon-width24px$sds-modal-content-header-icon-z-index50$sds-modal-content-header-padding0 32px$sds-modal-content-height100vh$sds-modal-content-height-max85vh$sds-modal-content-height-min214px$sds-modal-content-height-tabletauto$sds-modal-content-padding0 0 32px$sds-modal-content-title-font-weight400$sds-modal-content-width100%$sds-modal-content-width-max676px$sds-modal-content-width-tablet70%$sds-modal-content-z-index9999$sds-modal-overlay-color#000000$sds-modal-overlay-opacity0.65$sds-modal-overlay-z-index9998$sds-modal-small-content-font-size14px$sds-modal-small-content-heightauto$sds-modal-small-content-height-max85vh$sds-modal-small-content-height-min212px$sds-modal-small-content-height-min-tablet208px$sds-modal-small-content-line-height1.25$sds-modal-small-content-padding0 0 16px$sds-modal-small-content-width70vw$sds-modal-small-content-width-max300px$sds-modal-title-margin0 0 24px
Notification
$sds-notification-background-color#ffffff$sds-notification-border-radius0$sds-notification-color-error#cc1100$sds-notification-color-information#5c707c$sds-notification-color-success#93a533$sds-notification-color-warning#dfa20b$sds-notification-content-link-color#bb00cc$sds-notification-content-margin8px 0 0$sds-notification-icon-layout-left16px$sds-notification-icon-layout-top24px$sds-notification-icon-margin0 16px 0 0$sds-notification-icon-size24px$sds-notification-padding24px 16px$sds-notification-text-alignleft$sds-notification-title-font-weight700
Pagination
$sds-pagination-button-margin0 0 0 16px$sds-pagination-list-active-font-weight600$sds-pagination-list-color#5c707c$sds-pagination-list-link-color#bb00cc$sds-pagination-list-link-color-hover#532380$sds-pagination-list-link-padding0 12px$sds-pagination-list-margin24px 0$sds-pagination-text-aligncenter
Radio
$sds-radio-background-activeinset 0 0 0 5px #212121$sds-radio-background-active-disabledinset 0 0 0 4px #e6e6e6$sds-radio-background-color#ffffff$sds-radio-border-color#bdbdbd$sds-radio-border-color-active#212121$sds-radio-border-color-disabled#e6e6e6$sds-radio-border-color-error#cc1100$sds-radio-border-radius50%$sds-radio-border-stylesolid$sds-radio-border-width1px$sds-radio-height20px$sds-radio-label-color#212121$sds-radio-label-color-disabled#767676$sds-radio-label-color-error#cc1100$sds-radio-label-font-size16px$sds-radio-label-line-height1.25$sds-radio-label-padding0 0 0 24px$sds-radio-margin16px$sds-radio-width20px
Rating
$sds-rating-breakdown-bar-background-color#e6e6e6$sds-rating-breakdown-bar-background-color-full#532380$sds-rating-breakdown-bar-background-color-halflinear-gradient(90deg, #532380 50%, #e6e6e6 50%)$sds-rating-breakdown-bar-height6px$sds-rating-breakdown-bar-margin0 2px 0 0$sds-rating-breakdown-bar-width28px$sds-rating-breakdown-heightauto$sds-rating-breakdown-label-font-size14px$sds-rating-breakdown-label-font-weight600$sds-rating-breakdown-label-line-height1$sds-rating-breakdown-label-margin0 0 0 16px$sds-rating-breakdown-widthauto$sds-rating-count-color#555555$sds-rating-count-margin0 0 0 4px$sds-rating-height16px$sds-rating-item-background-size16px$sds-rating-item-fill#532380$sds-rating-item-font-size0$sds-rating-item-height16px$sds-rating-item-line-height1$sds-rating-item-margin0$sds-rating-item-width16px$sds-rating-link-color#bb00cc$sds-rating-width96px
Reveal
$sds-reveal-content-padding0 16px 0 0$sds-reveal-icon-margin0 0 0 8px$sds-reveal-summary-color#bb00cc$sds-reveal-summary-focus-border-size0$sds-reveal-summary-icon-fill#bb00cc$sds-reveal-summary-icon-fill-inverse#ffffff$sds-reveal-summary-icon-margin0 0 0 8px$sds-reveal-summary-margin0 0 16px$sds-reveal-summary-padding0 16px 0 0
Separator
$sds-separator-border-color#e6e6e6$sds-separator-border-size1px$sds-separator-border-stylesolid$sds-separator-margin20px 0
Tabs
$sds-tabs-border-color#e6e6e6$sds-tabs-border-size1px$sds-tabs-border-stylesolid$sds-tabs-list-alignflex-start$sds-tabs-list-color#555555$sds-tabs-list-color-active#212121$sds-tabs-list-font-size16px$sds-tabs-list-font-weight400$sds-tabs-list-font-weight-active700$sds-tabs-list-height40px$sds-tabs-list-item-box-shadow-activeinset 0 -4px 0 #bb00cc$sds-tabs-list-item-margin0 0 0 16px$sds-tabs-list-item-padding0 20px$sds-tabs-list-line-height1$sds-tabs-list-margin0 0 16px
Tag
$sds-tag-border-color#e6e6e6$sds-tag-border-radius4px$sds-tag-border-stylesolid$sds-tag-border-width1px$sds-tag-font-size14px$sds-tag-height32px$sds-tag-margin0 8px 0 0$sds-tag-padding0 8px$sds-tag-target-height44px$sds-tag-text-decorationnone
Text-field
$sds-color-form-focus#00bfde$sds-text-field-background-color#ffffff$sds-text-field-border-color#bdbdbd$sds-text-field-border-color-active#bdbdbd$sds-text-field-border-color-disabled#e6e6e6$sds-text-field-border-color-error#cc1100$sds-text-field-border-radius6px$sds-text-field-border-stylesolid$sds-text-field-border-width1px$sds-text-field-color#212121$sds-text-field-font-size16px$sds-text-field-height56px$sds-text-field-line-height1.5$sds-text-field-margin-textarea-focus24px$sds-text-field-min-height-textarea100px$sds-text-field-opacity-disabled0.4$sds-text-field-padding16px$sds-text-field-width100%$sds-text-field-width-max503px
Toggle
$sds-toggle-icon-height32px$sds-toggle-icon-svg-fill#767676$sds-toggle-icon-svg-fill-save#bb00cc$sds-toggle-icon-svg-height50%$sds-toggle-icon-svg-width50%$sds-toggle-icon-width32px$sds-toggle-label-color#767676$sds-toggle-label-font-size14px
Tooltip
$sds-tooltip-arrow-size24px$sds-tooltip-background-color#ffffff$sds-tooltip-border-color#e6e6e6$sds-tooltip-border-radius6px$sds-tooltip-border-size1px$sds-tooltip-border-stylesolid$sds-tooltip-box-shadow2px 2px 6px 0 rgba(0,0,0,0.08)$sds-tooltip-color#555555$sds-tooltip-content-font-size14px$sds-tooltip-content-line-height1.25$sds-tooltip-icon-background-colortransparent$sds-tooltip-icon-background-color-hover#f2f2f2$sds-tooltip-icon-border-radius0$sds-tooltip-icon-size32px$sds-tooltip-margin0 0 32px$sds-tooltip-padding16px$sds-tooltip-spacer-margin-13px -5px 0 0$sds-tooltip-width200px