Angular Material and component libraries
What Material and the CDK each actually provide, and the real decision between adopting a component library and building your own.
Angular Material and component libraries
The player loads from youtube-nocookie.com when you press play. Nothing reaches YouTube before that.
Not started
What you'll learn
- Angular Material ships ready-made, visually opinionated components (buttons, dialogs, form fields) implementing Google's Material Design; the CDK underneath it ships the same unstyled behavior primitives (overlays, focus trapping, drag-and-drop) with no visual opinion at all.
- Material 3's theming system replaces the older Sass-mixin-based approach with CSS custom properties, which is the current way to actually customize Material's visual design rather than fighting its defaults.
- The real decision isn't "use a library or don't" in the abstract — it's whether your product's design genuinely needs to diverge from Material's visual language, and whether the CDK alone (behavior, no opinion) might be the better middle ground.
Material and the CDK are solving two different problems
Angular Material is a full set of ready-made, visually complete components — buttons, dialogs, date pickers, form fields — implementing Google’s Material Design system out of the box. The Angular CDK (Component Dev Kit) underneath it is a different thing entirely: the same hard behavioral problems Material’s components solve — trapping focus inside a dialog, positioning an overlay relative to a trigger element, drag-and-drop reordering, virtual scrolling for huge lists — provided with no visual opinion attached at all. Material is built on top of the CDK; you can use the CDK on its own, with zero Material styling, to build entirely custom-looking components that still get the hard interaction logic solved correctly underneath.
That distinction matters more than it might initially seem, because it turns “Material or build your own” into a less binary choice than it first appears.
Material 3 theming: CSS custom properties, not Sass mixins
:root {
--mat-sys-primary: #6750a4;
--mat-sys-on-primary: #ffffff;
}
Angular Material’s current theming system (Material 3, or “M3”) is built around CSS custom properties — override a handful of CSS variables, and Material’s components pick up your colors, typography, and other design tokens directly. This replaced an older system built on Sass mixins and functions, which required importing specific Sass APIs and writing Sass-specific theming code. The CSS-custom-property approach is more direct and considerably easier to reason about — you’re overriding plain CSS variables, not learning a Sass-specific theming DSL, which matters a great deal for how far you can realistically push Material’s visual design away from its out-of-the-box look.
The actual decision: does your design genuinely need to diverge?
This is where the real judgment call lives, and it’s worth being direct about it rather than treating “component library or custom” as a style preference. If your product’s visual design is reasonably close to Material Design already, or if visual consistency with other Material-based products matters more than a distinctive look, adopting Material wholesale saves enormous amounts of time — every component you’d otherwise have to design, build, test, and make accessible yourself already exists, tested, in the library. If your product’s design language is meaningfully different from Material’s — and especially if that difference is a genuine product requirement, not just a preference — fully committing to Material means either fighting its defaults constantly or ending up with a Material-flavored app regardless of intent. The CDK-alone middle ground exists for exactly that situation: keep the hard, easy-to-get-wrong behavioral plumbing (and there’s a lot of it, in things like focus management and overlay positioning), and build your own visual layer entirely on top, rather than reimplementing both the behavior and the visuals yourself from nothing.
This lesson’s video is a current, focused look at Material 3’s theming system specifically; the linked “deeper” video takes a broader tour across Material and the CDK together if you want to see more of the component catalog and behavior primitives in one pass.
Check yourself
If a product's design language is nothing like Material Design, why might the CDK alone still be worth using, instead of either adopting Material wholesale or building every interactive pattern from scratch?
The CDK provides the hard, easy-to-get-subtly-wrong behavioral plumbing — focus trapping, overlay positioning, drag-and-drop mechanics — with zero visual styling imposed, so you get genuinely difficult interaction logic solved for you while building your own visual design entirely on top of it, rather than reimplementing that behavior yourself just to avoid Material's look.
What changed about customizing Angular Material's visual appearance with the move to Material 3 theming?
Material 3 theming is built around CSS custom properties rather than the older Sass-mixin-based theming system — meaning you customize Material's look by overriding CSS variables rather than writing Sass functions and importing a specific theming API, a more direct and framework-agnostic mechanism for adjusting colors, typography, and other design tokens.
Go deeper
Notes
Notes are saved to your account.
Everything else on this page works without one — progress and bookmarks keep themselves in this browser and come with you when you sign in. Notes are the one thing worth not trusting to a browser you might clear.
Your notes could not be loaded.