Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Make tab labels stretch to full width in material design for angular

Tags:

I would like to get tabs to stretch to the full width of their parent div. Anyone know how to do this?

<div class="tabs-header">     <mat-tab-group>         <mat-tab label="Signup">Content 1</mat-tab>         <mat-tab label="Login">Content 2</mat-tab>     </mat-tab-group> </div> 

As of now it looks like this:

enter image description here

I did some research it looks like there used to be a way to do this with something like <md-stretch-tabs> but that doesn't seem to be a feature and there is no documentation on it.

like image 870
Zachscs Avatar asked Feb 17 '18 08:02

Zachscs


1 Answers

Also, you can use mat-stretch-tabs property

<mat-tab-group mat-stretch-tabs>      <mat-tab label="Signup">Content 1</mat-tab>      <mat-tab label="Login">Content 2</mat-tab> </mat-tab-group> 
like image 90
Jayampathy Wijesena Avatar answered Sep 19 '22 19:09

Jayampathy Wijesena