menu
Dark Mode
backgroundLayer 1
preact-material-components
Original documentation
This component encapsulates mdc-theme, you can refer to its documentation here.
Preact-material-components brings mdc-theme as-is.
Changing colors
With preact-material-components you can either choose to use the bundled .css files or the .scss files. Both have their different ways to handle theming.
With the css files you can either override the colors and backgrounds with a more specificity css rule or you can alter the css variables defined on the original documentation page.
Whereas with the scss files you can directly go an while importing the scss of the individual components, you can declare your scss variabled as shown here.
Demo
Unstyled
Overridden with css property
Overridden with css variable
Theme colors as Text
Primary
Primary Light
Primary Dark
Secondary
Secondary Light
Secondary Dark
Theme colors as Background
Primary
Primary Light
Primary Dark
Background
Secondary
Secondary Light
Secondary Dark