Style Configuration
Advanced configuration for stylesheet & TailwindCSS
MYDS stylesheet is composed of various components to cater to a wide range of use cases. But you might not need everything in your project! Here's how we can be more selective with our imports!
Important
This section is for advanced styling configuration. If you are content with the simple configuration outlined in Installation, you may skip this page.
Foundation
Fonts
MYDS supports 2 typefaces: Poppins
& Inter
. We recommend you to import via a reputable CDN like GoogleFonts. Here's a one-liner CSS import!
Color
We define each color in the MYDS Design Language as a CSS variable, which later becomes the building block to build themes!
Theme
MYDS supports both light and dark mode. However, we understand that not all projects require this feature. So, you can omit importing the unwanted theme from your project!
Important
Please note it is required to support the light mode by default.
TailwindCSS
TailwindCSS is a utility-first CSS framework that serves as the bedrock for how MYDS is styled internally. However, using TailwindCSS is optional at the project level.
If you do use TailwindCSS, MYDS provides the option for developers to leverage on the defined CSS classes or extend your own variation to MYDS.
Installation
Before we start, make sure you have installed Tailwind CSS in your project. Refer to the official documentation for more information.
Preset Configuration
Once TailwindCSS is installed, you can import the MYDS presets to your own project! Also we need to make sure the TailwindCSS is 'aware' of the components from the library.
Color Token
MYDS has 2 types of color token that developers need to be aware of, which are:
-
Primitive token - The value of the primitive token is static & insensitive to theme changes.
-
Theme token - The value of the theme token changes based on the theme applied.
To learn the entire list of primitive & theme tokens available, read the full configuration