What is @angular/material?
The @angular/material package is a UI component library for Angular applications that implements Google's Material Design. It provides a wide range of reusable UI components that are designed to be efficient, accessible, and visually appealing. These components help developers build cohesive, attractive, and functional web applications with less effort.
What are @angular/material's main functionalities?
Form Controls
Form controls are essential for collecting input from the user. @angular/material provides various form controls like input fields, checkboxes, radio buttons, and select dropdowns. The code sample demonstrates how to import and use the MatInputModule for text inputs.
import {MatInputModule} from '@angular/material/input';
@NgModule({
imports: [MatInputModule]
})
export class MyModule {}
Navigation
Navigation components help users move through the application. This includes menus, side navigation, and toolbars. The code sample shows how to import the MatToolbarModule to use a Material Design toolbar in your application.
import {MatToolbarModule} from '@angular/material/toolbar';
@NgModule({
imports: [MatToolbarModule]
})
export class MyModule {}
Layout
Layout components assist in structuring the view of an application. @angular/material offers grid lists, cards, and tabs to help organize content. The code sample illustrates the use of MatGridListModule for creating grid layouts.
import {MatGridListModule} from '@angular/material/grid-list';
@NgModule({
imports: [MatGridListModule]
})
export class MyModule {}
Buttons & Indicators
Buttons and indicators are used for actions and status feedback. This category includes buttons, progress bars, and spinner indicators. The code sample demonstrates importing MatButtonModule to use Material Design buttons.
import {MatButtonModule} from '@angular/material/button';
@NgModule({
imports: [MatButtonModule]
})
export class MyModule {}
Other packages similar to @angular/material
ngx-bootstrap
ngx-bootstrap provides Bootstrap components powered by Angular. It's similar to @angular/material in providing a set of reusable UI components but is based on Bootstrap's design system rather than Material Design.
primeng
PrimeNG is a collection of rich UI components for Angular. It offers a wide range of widgets and is comparable to @angular/material in terms of providing components for form controls, tables, overlays, and more. PrimeNG is known for its extensive component library beyond what @angular/material offers.
ng-zorro-antd
NG-ZORRO is an Angular UI library based on Ant Design. Similar to @angular/material, it provides a comprehensive suite of UI components that are designed to be modular, lightweight, and easy to use. It differs in its design philosophy, following Ant Design principles instead of Material Design.
15.2.2 "topaz-toast" (2023-03-08)
material
| Commit | Type | Description |
| -- | -- | -- |
| e7612c747 | fix | chips: unable to shift + tab out of a chip set (#26727) |
| 1bf2fc2e1 | fix | core: mat-option sets aria-selected="false" (#26673) |
| 9473b1688 | fix | datepicker: resolve server-side rendering error (#26742) |
| 99dac0835 | fix | paginator: opt-out of single-selection indicator (#26746) |
| ec824f1f7 | fix | snack-bar: live region not working when modal is open (#26725) |
cdk-experimental
| Commit | Type | Description |
| -- | -- | -- |
| e1c8fe85b | fix | scrolling: throw error rather than string (#26736) |
Special Thanks
Kristiyan Kostadinov, RuoJia123 and Zach Arend
<!-- CHANGELOG SPLIT MARKER -->
<a name="15.2.1"></a>