A library to dynamically style Angular Material components using CSS custom properties (CSS variables).
angular-material-css-vars is a library that enables dynamic theming of Angular Material components using CSS custom properties. It solves the limitation of Angular Material's static theming by allowing developers to change theme colors, contrast, and density at runtime. This provides greater flexibility for applications requiring live theme adjustments.
Angular developers using Angular Material (M2) who need to implement dynamic, runtime-adjustable themes in their applications. It is particularly useful for those building applications with user-customizable themes or requiring theme switching (e.g., light/dark mode).
Developers choose this library because it bridges Angular Material's static theming with the dynamic capabilities of CSS variables, offering runtime theme control without sacrificing compatibility. Its unique selling point is the ability to programmatically adjust colors, contrast, and density via a service while exposing design tokens as CSS custom properties for custom styling.
Little library to use css variables with @angular/material
Enables changing theme colors, contrast, and density at runtime via MaterialCssVarsService, allowing live adjustments without page reloads, as demonstrated in the setup examples.
Exposes Angular Material's design tokens as CSS custom properties, providing flexibility for custom styling with utility mixins like mat-css-color-primary for SCSS access.
Automatically adjusts contrast colors based on thresholds via setAutoContrastEnabled, ensuring WCAG compliance without manual calculations, with options for fine-tuning.
Supports custom typography, density levels, and dark/light theme selectors through SCSS mixins and initialization parameters, as shown in the font config and density sections.
The README explicitly states it only supports Angular Material M2, not the stable M3 theme introduced in v18, limiting use in newer projects without workarounds.
Requires removing Angular Material's core mixin (@include mat.core()) and replacing it with library code, which can break existing setups and increase configuration errors.
The compatibility table shows strict version matching with Angular, leading to frequent breaking changes and maintenance overhead during upgrades.
For pre-MDC components, a separate legacy package is needed, adding complexity and potential inconsistencies in projects with mixed component versions.
Covalent - A Design System for Teradata
Angular 21 & Bootstrap 5 & Material Design UI KIT
Ignite UI for Angular is a complete library of Angular UI components with the fastest grids and charts, dock manager, and more.
Angular Material Extensions Library.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.