Angular + Angular Material
Material Design 3 components from the Angular team. This page shows exactly what pickstack adds to a Angular project for Angular Material: the packages, the new files and the changes to existing ones. Every combination is installed, built, linted and tested in CI.
$ npm create pickstack@latest my-app -- --framework angular --modules angular-material --yesCustomize in the configurator
Packages it adds
| Package | Version | Type |
|---|---|---|
@angular/cdk | ^22.3.0 | runtime |
@angular/material | ^22.3.0 | runtime |
New files
// Include theming for Angular Material with `mat.theme()`.
// This Sass mixin will define CSS variables that are used for styling Angular Material
// components according to the Material 3 design spec.
// Learn more about theming and how to use it for your application's
// custom components at https://material.angular.dev/guide/theming
@use "@angular/material" as mat;
html {
height: 100%;
@include mat.theme(
(
color: (
primary: mat.$azure-palette,
tertiary: mat.$blue-palette,
),
typography: Roboto,
density: 0,
)
);
}
body {
// Default the application to a light color theme. This can be changed to
// `dark` to enable the dark color theme, or to `light dark` to defer to the
// user's system settings.
color-scheme: light;
// Set a default background, font and text colors for the application using
// Angular Material's system-level CSS variables. Learn more about these
// variables at https://material.angular.dev/guide/system-variables
background-color: var(--mat-sys-surface);
color: var(--mat-sys-on-surface);
font: var(--mat-sys-body-medium);
// Reset the user agent margin.
margin: 0;
height: 100%;
}
Changes to existing files
⋯ 24 unchanged lines "input": "public" } ],+ "styles": ["src/material-theme.scss", "src/styles.css"]− "styles": ["src/styles.css"] }, "configurations": { "production": {⋯ 39 unchanged lines
+<mat-card appearance="outlined" class="counter">+ <mat-card-header>+ <mat-card-title>Counter</mat-card-title>+ </mat-card-header>+ <mat-card-content>+ <p class="count">{{ count() }}</p>+ </mat-card-content>+ <mat-card-actions class="actions">+ <button matButton="outlined" type="button" (click)="decrement()">-1</button>+ <button matButton="filled" type="button" (click)="increment()">+1</button>+ </mat-card-actions>+</mat-card>−<div class="card">− <p class="count">{{ count() }}</p>− <div class="row">− <button type="button" class="btn" (click)="decrement()">-1</button>− <button type="button" class="btn" (click)="increment()">+1</button>− </div>−</div>
import { Component, signal } from "@angular/core";+import { MatButton } from "@angular/material/button";+import {+ MatCard,+ MatCardActions,+ MatCardContent,+ MatCardHeader,+ MatCardTitle,+} from "@angular/material/card"; @Component({ selector: "app-counter",+ imports: [+ MatButton,+ MatCard,+ MatCardActions,+ MatCardContent,+ MatCardHeader,+ MatCardTitle,+ ], templateUrl: "./counter.html", }) export class Counter {⋯ 11 unchanged lines
<section class="page"> <h1 class="title">About</h1>+ <p class="text">Built with Angular 22, TypeScript, Angular Material.</p>− <p class="text">Built with Angular 22, TypeScript.</p> </section>
⋯ 4 unchanged lines <title>my-app</title> <base href="/" /> <meta name="viewport" content="width=device-width, initial-scale=1" />+ <link rel="preconnect" href="https://fonts.googleapis.com" />+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />+ <link+ href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500&display=swap"+ rel="stylesheet"+ />+ <link+ href="https://fonts.googleapis.com/icon?family=Material+Symbols+Outlined"+ rel="stylesheet"+ /> </head> <body> <app-root></app-root>⋯ 3 unchanged lines
⋯ 87 unchanged lines background: #334155; } +.counter {+ min-width: 16rem;+ text-align: center;+}+ +.actions {+ justify-content: center;+ gap: 0.75rem;+}+
Project files
.gitignoreREADME.mdangular.jsonpackage.jsonpublic/robots.txtsrc/app/app.config.tssrc/app/app.htmlsrc/app/app.routes.tssrc/app/app.tssrc/app/components/counter/counter.htmlsrc/app/components/counter/counter.tssrc/app/pages/about/about.htmlsrc/app/pages/about/about.tssrc/app/pages/home/home.htmlsrc/app/pages/home/home.tssrc/index.htmlsrc/main.tssrc/material-theme.scsssrc/styles.csstsconfig.app.jsontsconfig.json