Getting Started
Sentro was created to provide a simple scaffolding for creating design systems in SCSS with design tokens as its main foundation. To understand the decisions made in the creation of Sentro, it's important to understand the philosophy behind it.
Freely architected
Sentro is designed to be flexible and adaptable to any design system. While it does have its own set of recommended and forced conventions, it doesn't enforce a specific design system architecture, but rather provides a set of tools to help you build your design system the way you want it to be.
Small API
Sentro mainly revolves around two core modules: tokens and keys. These are the heart of what Sentro does best. (See examples below).
Token-driven
Sentro is fundamentally a design token creation and management system for design systems. While compared to before it has evolved into a semi-complete robust design system creation toolkit, design tokens remain at the heart of Sentro's operations.
Token integrity
All tokens created and queried are validated before they get to production. Sentro has built-in validators for all modules. This ensures that no one accidentally uses a token that is non-existent or devoid from the specification.
Naming
It is important to have naming consistency for design tokens that govern both the design and engineering aspects of the design system. The disjunction between designers calling a token color.primary.400
and developers calling it color-green-400
causes a language divide between both teams. This can lead to confusion between terminologies, and might lead to implementing the wrong specifications. Sentro enables you to have naming consistency down to the separator, so designers and engineers can now both speak the same language.
Made with CSS Custom Properties
CSS custom properties are more than just variables in CSS. They are a powerful tool that can be used in creating an API for your design system. Sentro uses CSS custom properties under the hood to generate the design tokens that you can use in your projects. Any token or key defined with Sentro can be used just by using regular CSS.
Since we're generating CSS custom properties, you can use these to create component variants, themes, and an intuitive API for your engineers to consume. Here's an example of how you can easily create variants for your components:
Portable Configurations
Data from one Sentro project can be easily shared with another Sentro project. Sentro achieves this by using standard SCSS maps and lists to store your token data. Sharing your design tokens with another project is as simple as doing this:
Framework Agnostic
To maximize the usability of your design system, Sentro is built in SCSS. This means that everything that Sentro builds, can be imported as a CSS file into any project.