@patternfly/react-tokens
Installation
yarn add @patternfly/react-tokens
or
npm install --save @patternfly/react-tokens
Usage
All Tokens and their corresponding values can be viewed on the PatternFly React Tokens page.
Import tokens
;
Each token as three properties
name
: The CSS custom property name.value
: The default value for the custom property.var
: The property name wrapped invar()
.
; global_BackgroundColor_100name === '--pf-global--BackgroundColor--100'; //trueglobal_BackgroundColor_100value === '#fff'; // trueglobal_BackgroundColor_100var === 'var(--pf-global--BackgroundColor--100)'; //true