Skip to main content

angular material - How to change Divider thickness

app.component.ts

import { Component } from '@angular/core';

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styles: [`
      .mat-divider {
        border-top-width: 5px;
      }
  `]
})


export class AppComponent { }
app.component.html

<h2 style="padding-top:25px; padding-bottom:25px;">
    Angular Material - How to change Divider thickness
</h2>


<h4>Divider line thinkness : 5 pixels</h4>

<h3>I am top</h3>
<mat-divider></mat-divider>

<h3>I am middle</h3>
<mat-divider></mat-divider>

<h3>I am bottom</h3>
app.module.ts [import]

import {MatDividerModule} from '@angular/material/divider'
More Angular tutorials