Reputation: 151
I have a mat-tab-group with 3 tabs, and i would like for each tab to have a different text color and also change te color of the blue outline at the bottom. Is this even possible? If so, can you give me an idea on how to do this?
This is the default look the tabs have in my app:
And this is how i would like them to look:
The code for the tabs:
<mat-tab-group (selectedIndexChange)="onSelectedIndexChange($event)" [(selectedIndex)]="matTabSeleccionada">
<mat-tab class="" label="Total">
</mat-tab>
<mat-tab class="" label="Bayer">
</mat-tab>
<mat-tab class="" label="Monsanto">
</mat-tab>
</mat-tab-group>
Upvotes: 1
Views: 1288
Reputation: 32629
Angular material supports styling the label with a template, see this Stackblitz
<mat-tab-group>
<mat-tab label="First">
<ng-template mat-tab-label>
<span class="red-bold">zzzzz</span>
</ng-template>
</mat-tab>
<mat-tab label="Second"> Content 2 </mat-tab>
<mat-tab label="Third"> Content 3 </mat-tab>
</mat-tab-group>
Result:
Upvotes: 1