Settings
Here's the configuration API when using the main Sentro module.
Prefix
It accepts a string. This will serve as the prefix for your design system. Prefixes are a great solution to identifying your design system from another.
Context
It accepts a string. This will serve as the token context for your design system. Meaning what's the terminology for your tokens. For example, I like to use theme
as my context so when it outputs my tokens it will look something like:
Separator
It accepts a string. This will be the separator for your tokens. By default, it uses -
as the separator.
This is specifically useful if your design system specifications call for a different separator for tokens. For example, you want to use .
instead of -
for your tokens. You can set it like this:
Now your tokens consumption will look like this:
Scope
The scope of this setting is not only exclusive to tokens but also to keys and breakpoints:
$token-validation
It accepts a boolean value. This will enable/disable token validation throughout the whole design system. Meaning you won't get any errors for any invalid token. It is turned on by default.
Usage
Use it upon using the module in the root stylesheet.
$key-validation
It accepts a boolean value. This will enable/disable key validation throughout the whole design system. Meaning you won't get any errors for any invalid key. It is turned on by default.
Usage
Use it upon using the module in the root stylesheet.
$breakpoint-validation
It accepts a boolean value. This will enable/disable breakpoint validation throughout the whole design system. Meaning you won't get any errors for any invalid breakpoint. It is turned on by default.
Usage
Use it upon using the module in the root stylesheet.
$default-separator
It accepts a character. This will be the default token separator for your entire design system.