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

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

Thanks in advance.

  • 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

You can use the following CSS in your component

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

Adjust as needed


Try Add this following In css

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

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.