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
    Feb 21 '17 at 2:41
  • tab itself not the detail.
    – sfdcdev
    Feb 21 '17 at 2:51
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;
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.