Changing tab text color on selection

11,857

You need to use the following class for active tab:

.mat-tab-label-active {
     color: #00ADEE !important;
 } 

Here is a link to working demo.

Share:
11,857

Related videos on Youtube

nethra gowda
Author by

nethra gowda

Happy Soul (Working as an Android Developer)

Updated on June 04, 2022

Comments

  • nethra gowda
    nethra gowda almost 2 years

    I am working on Angular4 and have been using angular material. I have created a tab-group and I want to change the text color of a tab label when I select any tab. I have tried to override the default css but that didn't help me.

    I can override the ink bar but I am not able to override tab-text color upon selection

    .mat-ink-bar{
        background-color:#00ADEE;
    }
     /*.mat-tab-label::selection{
     color: #00ADEE !important;
     } */
    

    The commented part which I was trying to change the color of a tab-label-color.