pickstack

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 --yes
Customize in the configurator

Packages it adds

PackageVersionType
@angular/cdk^22.3.0runtime
@angular/material^22.3.0runtime

New files

src/material-theme.scss
// 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

angular.json (changed)
⋯ 24 unchanged lines                 "input": "public"               }             ],+            "styles": ["src/material-theme.scss", "src/styles.css"]−            "styles": ["src/styles.css"]           },           "configurations": {             "production": {⋯ 39 unchanged lines
src/app/components/counter/counter.html (changed)
+<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>  
src/app/components/counter/counter.ts (changed)
 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
src/app/pages/about/about.html (changed)
 <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>  
src/index.html (changed)
⋯ 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
src/styles.css (changed)
⋯ 87 unchanged lines   background: #334155; }  +.counter {+  min-width: 16rem;+  text-align: center;+}+ +.actions {+  justify-content: center;+  gap: 0.75rem;+}+ 

Project files