No Preview

Sorry, but you either have no stories or none are selected somehow.

If the problem persists, check the browser console, or the terminal you've run Storybook from.

Colors

Some components such as Typography have a color, bg/backgroundColor and opacity props, this functionality is provided by styled-system/color.

You can use a CSS string, the name of a palette colour or design tokens.

CSS String

<Typography color='red'>...</Typography>
<Typography color='#ff0000'>...</Typography>
<Typography color='rgba(100, 0, 0, 1)'>...</Typography>

Palette Colors

Using the name of a palette color ensures if we update the theme your components will also be updated, for this reason we advise not using a CSS string.

HexPalette ColorTintShadeOpacity
#00DC00brilliantGreenbrilliantGreenTintbrilliantGreenShade
#E96400carrotOrangecarrotOrangeTintcarrotOrangeShade
#C7384FerrorRederrorRedTinterrorRedShade
#009900genericGreengenericGreenTintgenericGreenShade
#FFB500goldgoldTintgoldShade
#00A376productGreenproductGreenTintproductShade
#0077C8productBlueproductBlueTintproductBlueShade
#004B87navyBluenavyBlueTintnavyBlueShade
#582C83amethystamethystTintamethystShade
#8246AFplumplumTintplumShade
#003349slateslateTintslateShade
#000000blackOpacity
#ffffffwhiteOpacity

Tint, Shade and Opacity properties must be followed by a number.

Where there is a collision between CSS strings and the palette color (e.g. gold) the palette color takes presedence.

<Typography color='brilliantGreen'>...</Typography>
<Typography color='brilliantGreenTint20'>...</Typography>
<Typography color='brilliantGreenShade30'>...</Typography>
<Typography color='blackOpacity55'>...</Typography>
<Typography color='whiteOpacity22'>...</Typography>

Design tokens

Using design tokens ensures visual consistency across the application and means that we will always have up-to-date values, if the colors are updated by designers using design tools.

The name of the chosen design token must be always preceded by --, for example, if we want to use colorsYang100 token in our code, we have to pass --colorsYang100 as a prop. See Design Tokens documentation for more information.

<Typography color='--colorsUtilityYang100'>...</Typography>
<Typography color='--colorsReadOnly600'>...</Typography>
<Typography color='--colorsUtilityYin090'>...</Typography>