Apple Music » Making only the first tab active

Making only the first tab active

Currently, all the tabs are red, while only the first one should be, and the inactive tabs should be gray.

I left them red on purpose because you can tweak a layer’s color in Framer. And removing a color (using grayscale or saturate) is especially easy.

We use a for…in loop to iterate through all of $.Tabs’s children and dial down their color saturation to zero, which will make them gray. They’ll still be a bit too dark, but by also lowering their opacity to 60% they’ll have the correct shade of gray.

for tab in $.Tabs.children
    tab.saturate = 0
    tab.opacity = 0.6

And then we can reset these properties for $.Tab_Library, because that’s our first tab, the one that should be active.

$.Tab_Library.saturate = 100
$.Tab_Library.opacity = 1
Download Framer project
All tabs but the first one are now gray