Mineral UI distributes design tokens through the mineral-ui-tokens npm package and consumes these granular entities in order to maintain a consistent visual system that scales across experiences. Maintaining a separate tokens package also allows for a diverse range of teams on various frameworks to access the building blocks of Mineral UI.
Formats #
JavaScript #
JavaScript token names are formatted in "pseudo_camelCase", e.g. boxShadow_1
Import tokens from the default export #
import tokens from 'mineral-ui-tokens';
Import the palette, specific color ramps, or specific tokens from named exports #
import { palette, magenta, boxShadow_1 } from 'mineral-ui-tokens';
Import tokens & palette, as Sass variables #
import 'mineral-ui-tokens/index.scss';
Note: This type of import may require the addition of a Sass loader to your bundler.
Sass #
Sass token names are formatted in "pseudoKebab-case", with a prefix, e.g.
$mnrl-boxShadow-1
@import '<path_to_node_modules>/mineral-ui-tokens/index.scss';
Tokens Index #
Token names use a [target]_[property]_[variation]_[state]
naming scheme.
target
- the type of element targeted by the token, e.g. "input" or "panel"property
(required) - the CSS property of the token, e.g. "backgroundColor"variation
- any differentiating aspect of the token that isn't state, e.g. "brand", "primary", "success"state
- state-dependent aspects, e.g. "focus", "selected"
Select a token format to display correct token names in the table below:
Select a token format
background #
Variable | Value |
---|---|
backgroundColor | #ffffff |
backgroundColor_active | #ebeff5 |
backgroundColor_disabled | #ebeff5 |
backgroundColor_focus | #ffffff |
backgroundColor_hover | #f5f7fa |
backgroundColor_brand_selected | #f0f5fc |
backgroundColor_brand_selectedActive | #accbfc |
backgroundColor_brand_selectedHover | #cfe0fc |
backgroundColor_brandPrimary | #3272d9 |
backgroundColor_brandPrimary_active | #1d5bbf |
backgroundColor_brandPrimary_focus | #3272d9 |
backgroundColor_brandPrimary_hover | #5691f0 |
backgroundColor_danger_active | #fad4d4 |
backgroundColor_danger_focus | #faf0f0 |
backgroundColor_danger_hover | #faf0f0 |
backgroundColor_dangerPrimary | #de1b1b |
backgroundColor_dangerPrimary_active | #b80d0d |
backgroundColor_dangerPrimary_focus | #de1b1b |
backgroundColor_dangerPrimary_hover | #f55353 |
backgroundColor_success_active | #abedc5 |
backgroundColor_success_focus | #e1faeb |
backgroundColor_success_hover | #e1faeb |
backgroundColor_successPrimary | #2a854e |
backgroundColor_successPrimary_active | #20693d |
backgroundColor_successPrimary_focus | #2a854e |
backgroundColor_successPrimary_hover | #3ba164 |
backgroundColor_warning_active | #fad8af |
backgroundColor_warning_focus | #fcf2e6 |
backgroundColor_warning_hover | #fcf2e6 |
backgroundColor_warningPrimary | #ad5f00 |
backgroundColor_warningPrimary_active | #8a4d03 |
backgroundColor_warningPrimary_focus | #ad5f00 |
backgroundColor_warningPrimary_hover | #cf7911 |
border #
Variable | Value |
---|---|
borderColor | #c8d1e0 |
borderColor_brand | #3272d9 |
borderColor_brand_active | #1d5bbf |
borderColor_brand_focus | #1d5bbf |
borderColor_brand_hover | #5691f0 |
borderColor_danger | #de1b1b |
borderColor_danger_active | #b80d0d |
borderColor_danger_focus | #b80d0d |
borderColor_danger_hover | #f55353 |
borderColor_success | #2a854e |
borderColor_success_active | #20693d |
borderColor_success_focus | #20693d |
borderColor_success_hover | #3ba164 |
borderColor_warning | #ad5f00 |
borderColor_warning_active | #8a4d03 |
borderColor_warning_focus | #8a4d03 |
borderColor_warning_hover | #cf7911 |
borderRadius_1 | 3px |
breakpoint #
Variable | Value |
---|---|
breakpoint_narrow | 512px |
breakpoint_medium | 768px |
breakpoint_wide | 1024px |
depth #
Variable | Value |
---|---|
boxShadow_1 | 0 1px 2px 0 rgba(0,0,0,0.2), 0 2px 4px 0 rgba(0,0,0,0.2) |
boxShadow_2 | 0 2px 4px 0 rgba(0,0,0,0.2), 0 4px 8px 0 rgba(0,0,0,0.2) |
boxShadow_3 | 0 4px 8px 0 rgba(0,0,0,0.2), 0 8px 16px 0 rgba(0,0,0,0.2) |
boxShadow_4 | 0 8px 16px 0 rgba(0,0,0,0.2), 0 20px 16px -8px rgba(0,0,0,0.2) |
boxShadow_5 | 0 16px 24px 0 rgba(0,0,0,0.2), 0 32px 24px -16px rgba(0,0,0,0.2) |
zIndex_100 | 100 |
zIndex_200 | 200 |
zIndex_400 | 400 |
zIndex_800 | 800 |
zIndex_1600 | 1600 |
heading #
Variable | Value |
---|---|
h1_color | #333840 |
h1_fontSize | 2.125rem |
h1_fontWeight | 800 |
h2_color | #58606e |
h2_fontSize | 1.75rem |
h2_fontWeight | 700 |
h3_color | #58606e |
h3_fontSize | 1.375rem |
h3_fontWeight | 700 |
h4_color | #58606e |
h4_fontSize | 1.125rem |
h4_fontWeight | 700 |
h5_color | #333840 |
h5_fontSize | 0.875rem |
h5_fontWeight | 700 |
h6_color | #58606e |
h6_fontSize | 0.875rem |
h6_fontWeight | 400 |
icon #
Variable | Value |
---|---|
icon_color | #58606e |
icon_color_brand | #3272d9 |
icon_color_danger | #de1b1b |
icon_color_success | #2a854e |
icon_color_warning | #ad5f00 |
input #
Variable | Value |
---|---|
input_backgroundColor | #ffffff |
input_backgroundColor_disabled | #ebeff5 |
input_color_placeholder | #8e99ab |
panel #
Variable | Value |
---|---|
panel_backgroundColor | #ffffff |
panel_backgroundColor_inverted | #434a54 |
panel_borderColor | #ebeff5 |
panel_borderColor_inverted | #434a54 |
size #
Variable | Value |
---|---|
size_small | 24px |
size_medium | 32px |
size_large | 40px |
size_jumbo | 52px |
space #
Variable | Value |
---|---|
space_inline_xxs | 2px |
space_inline_xs | 4px |
space_inline_sm | 8px |
space_inline_md | 16px |
space_inline_lg | 24px |
space_inline_xl | 32px |
space_inline_xxl | 64px |
space_inset_sm | 8px |
space_inset_md | 16px |
space_inset_lg | 24px |
space_stack_xxs | 2px |
space_stack_xs | 4px |
space_stack_sm | 8px |
space_stack_md | 16px |
space_stack_lg | 24px |
space_stack_xl | 32px |
space_stack_xxl | 64px |
typography #
Variable | Value |
---|---|
color | #333840 |
color_inverted | #ffffff |
color_disabled | #afbacc |
color_mouse | #58606e |
color_readOnly | #58606e |
color_required | #de1b1b |
color_brand | #3272d9 |
color_brandPrimary | #ffffff |
color_brand_active | #1d5bbf |
color_brand_focus | #3272d9 |
color_brand_hover | #5691f0 |
color_danger | #de1b1b |
color_dangerPrimary | #ffffff |
color_danger_active | #b80d0d |
color_danger_focus | #de1b1b |
color_danger_hover | #f55353 |
color_success | #2a854e |
color_successPrimary | #ffffff |
color_success_active | #20693d |
color_success_focus | #2a854e |
color_success_hover | #3ba164 |
color_warning | #ad5f00 |
color_warningPrimary | #ffffff |
color_warning_active | #8a4d03 |
color_warning_focus | #ad5f00 |
color_warning_hover | #cf7911 |
fontFamily | "Open Sans" |
fontFamily_system | -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol" |
fontFamily_monospace | "SF Mono", "Droid Sans Mono", "Source Code Pro", Monaco, Consolas, "Courier New", Courier, monospace |
fontSize_base | 1rem |
fontSize_mouse | 0.6875rem |
fontSize_prose | 1rem |
fontSize_ui | 0.875rem |
fontWeight_regular | 400 |
fontWeight_semiBold | 600 |
fontWeight_bold | 700 |
fontWeight_extraBold | 800 |
lineHeight | 1.25 |
lineHeight_heading | 1.25 |
lineHeight_heading_small | 1.5 |
lineHeight_prose | 1.5 |
well #
Variable | Value |
---|---|
well_backgroundColor | #ebeff5 |
well_backgroundColor_danger | #fad4d4 |
well_backgroundColor_success | #abedc5 |
well_backgroundColor_warning | #fad8af |
well_borderColor_danger | #fa8e8e |
well_borderColor_success | #57c282 |
well_borderColor_warning | #e89c3f |
palette #
Variable | Value |
---|---|
black | #1d1f24 |
white | #ffffff |
brand_10 | #f0f5fc |
brand_20 | #cfe0fc |
brand_30 | #accbfc |
brand_40 | #84b1fa |
brand_50 | #5691f0 |
brand_60 | #3272d9 |
brand_70 | #1d5bbf |
brand_80 | #114599 |
brand_90 | #103570 |
brand_100 | #15233b |
blue_10 | #f0f5fc |
blue_20 | #cfe0fc |
blue_30 | #accbfc |
blue_40 | #84b1fa |
blue_50 | #5691f0 |
blue_60 | #3272d9 |
blue_70 | #1d5bbf |
blue_80 | #114599 |
blue_90 | #103570 |
blue_100 | #15233b |
bronze_10 | #fcf2e6 |
bronze_20 | #fad8af |
bronze_30 | #f5bc76 |
bronze_40 | #e89c3f |
bronze_50 | #cf7911 |
bronze_60 | #ad5f00 |
bronze_70 | #8a4d03 |
bronze_80 | #693d07 |
bronze_90 | #4d2f0b |
bronze_100 | #33210c |
dusk_10 | #f4f2f7 |
dusk_20 | #e3dcf7 |
dusk_30 | #cec2f0 |
dusk_40 | #b5a6e3 |
dusk_50 | #9886cf |
dusk_60 | #7a68b3 |
dusk_70 | #645396 |
dusk_80 | #4f4178 |
dusk_90 | #3a3154 |
dusk_100 | #282436 |
gray_10 | #f5f7fa |
gray_20 | #ebeff5 |
gray_30 | #dde3ed |
gray_40 | #c8d1e0 |
gray_50 | #afbacc |
gray_60 | #8e99ab |
gray_70 | #707a8a |
gray_80 | #58606e |
gray_90 | #434a54 |
gray_100 | #333840 |
green_10 | #e1faeb |
green_20 | #abedc5 |
green_30 | #7ddba3 |
green_40 | #57c282 |
green_50 | #3ba164 |
green_60 | #2a854e |
green_70 | #20693d |
green_80 | #1a5230 |
green_90 | #153d25 |
green_100 | #112b1b |
indigo_10 | #f2f2fc |
indigo_20 | #dcdcfc |
indigo_30 | #c2c2fc |
indigo_40 | #a7a7fa |
indigo_50 | #8585f2 |
indigo_60 | #6767e6 |
indigo_70 | #4d4dd1 |
indigo_80 | #3737b3 |
indigo_90 | #28288a |
indigo_100 | #202057 |
magenta_10 | #faf0f4 |
magenta_20 | #fad4e4 |
magenta_30 | #fab4d1 |
magenta_40 | #f78bb8 |
magenta_50 | #ed5393 |
magenta_60 | #d6246e |
magenta_70 | #b01355 |
magenta_80 | #8a1244 |
magenta_90 | #611535 |
magenta_100 | #421527 |
purple_10 | #f5f0fa |
purple_20 | #ead9fa |
purple_30 | #dabcf7 |
purple_40 | #c79bf2 |
purple_50 | #ae74e8 |
purple_60 | #9656d6 |
purple_70 | #7d3cbd |
purple_80 | #642b9e |
purple_90 | #4b2175 |
purple_100 | #371c52 |
red_10 | #faf0f0 |
red_20 | #fad4d4 |
red_30 | #fab6b6 |
red_40 | #fa8e8e |
red_50 | #f55353 |
red_60 | #de1b1b |
red_70 | #b80d0d |
red_80 | #8f0e0e |
red_90 | #661414 |
red_100 | #451717 |
sky_10 | #e8f4fa |
sky_20 | #bbe5fa |
sky_30 | #8dd4f7 |
sky_40 | #53baed |
sky_50 | #229ad6 |
sky_60 | #0c7bb3 |
sky_70 | #066391 |
sky_80 | #064d70 |
sky_90 | #093952 |
sky_100 | #0c2938 |
slate_10 | #edf4f7 |
slate_20 | #cbe3f5 |
slate_30 | #a7ceeb |
slate_40 | #84b7db |
slate_50 | #5e95bd |
slate_60 | #48799c |
slate_70 | #376180 |
slate_80 | #2d4d63 |
slate_90 | #243947 |
slate_100 | #1d2830 |
teal_10 | #e4f7f6 |
teal_20 | #a8ede9 |
teal_30 | #6cd9d2 |
teal_40 | #45bfb7 |
teal_50 | #28a199 |
teal_60 | #17827b |
teal_70 | #116963 |
teal_80 | #0d524d |
teal_90 | #0b3d3a |
teal_100 | #092b29 |