1

I have a Napili community where I am using Standard Tabs component to show different standard and custom lightning component. I want to change the background image every time I clicked on the different tab (Not tab background). One image on one tab. How I can achieve that any guesses?

I am looking something like these images:- Background image on tab 1Background image on tab 2Background image on tab 3

1 Answer 1

1

Each tab has a different class, if you scope your CSS rules properly under community branding, you can easily achieve this.

Tab 1

enter image description here

Tab 2

enter image description here

You can use your browser dev tools to help you figure out the proper css scoping:

enter image description here

If you want to completely change the background of the community based on different tabs you have, you will have to create a custom theme layout in order to be able to interact with the template body and within it use tabsets where you can use the onactive attribute to change the template body programmatically.

2
  • Thanks for reply. But I am not looking to change background image of tab. I updated my question. Sorry for less information. Thanks ones again. Commented Sep 21, 2017 at 6:13
  • updated the answer
    – glls
    Commented Sep 21, 2017 at 18:06

You must log in to answer this question.

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