Create backdrop of Material Design for Angular

Issue

I’m starting a new project with Angular 13 and Angular Material. I want to use a Backdrop element like it is defined in Material Design (Material Design Backdrop) but I can not find a component in the Angular Material library. Is it possible to create my own Backdrop by using other Material components like MatDialog or Cdk Overlay?

Solution

Welcome 🙂

As Aldin Bradaric already says, Cdk Overlay gets your there.

There is a npm package available that already implements Material Design Backdrop using Cdk Overlay:

ngx-mat-backdrop on Github
ngx-mat-backdrop on npm

It is full compatible with Angular 13 and Angular Material.

Answered By – mifloma

Answer Checked By – Marilyn (AngularFixing Volunteer)

Leave a Reply

Your email address will not be published.