0

How can I set background color for selected tab in lightning:tabset

<lightning:tabset>
    <lightning:tab label="Item One">
        Sample Content One
    </lightning:tab>
    <lightning:tab label="Item Two">
        Sample Content Two
    </lightning:tab>
</lightning:tabset>

Thanks in advance.

2
  • The Tab or the tab detail?
    – Eric
    Commented Feb 21, 2017 at 2:41
  • tab itself not the detail.
    – sfdcdev
    Commented Feb 21, 2017 at 2:51

3 Answers 3

1

You can use the following CSS in your component

.THIS slds-tabs--default__nav li.slds-active{
     background: red;
}

Adjust as needed

1

Try Add this following In css

.THIS .slds-tabs--default__item.slds-active{
     background: blue;
}
0

Adding the CSS below worked for me:

.THIS .slds-tabs_default__item.slds-is-active {
    background: greenyellow !important;
}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .