Skip to main content

I’m rebuilding a load of our components, and was hoping to make a top navbar component that can display any nav item tab as selected without having to resort to making a variant for each item showing as highlighted.

 

I’d like to have a single navbar component, with a sub-component for the different states of the tabs (selected/unselected), and then just use whatever functionality Figma offers to allow a single dropdown to select the live tab.

I can see that it’s possible if I expose properties from nested instances, but that then means I display a full list of each menu item as a property, and all have to be switched off apart from the selected one, which is clumsy.

I’ve currently settled on an unsatisfactory compromise where I’ve build a single navbar component, and then made a nested component for just the tabs themselves. I still have to then make a variant for each of the nav items, albeit just for the tabs and not the whole bar. 

Is it currently possible to do what I’d like?

I’m rebuilding a load of our components, and was hoping to make a top navbar component that can display any nav item tab as selected without having to resort to making a variant for each item showing as highlighted.

 

I’d like to have a single navbar component, with a sub-component for the different states of the tabs (selected/unselected), and then just use whatever functionality Figma offers to allow a single dropdown to select the live tab.

I can see that it’s possible if I expose properties from nested instances, but that then means I display a full list of each menu item as a property, and all have to be switched off apart from the selected one, which is clumsy.

I’ve currently settled on an unsatisfactory compromise where I’ve build a single navbar component, and then made a nested component for just the tabs themselves. I still have to then make a variant for each of the nav items, albeit just for the tabs and not the whole bar. For projects outside of Figma, i have found that handling complexity gets much easier with reliable tools, for example, online payment gateway service providers makes online payments instant and seamless without adding extra steps.

Is it currently possible to do what I’d like?

Figma’s variants and exposed instance props do not yet support the idea of a single active state across siblings, the UI you are describing is basically radiobutton logic, and Figma does not have true exclusivity controls for properties.

One thing worth considering, though, is whether you need the navbar to behave as a single component at all. A lot of design system teams actually split navbars into two layers:

the shell component, and a slot for tab instances.

Each tab component carries its own boolean selected property. It feels less elegant cuz you set the state per tab rather than from a dropdown on the parent, but the advantage is huge: when this library is handed to devs, it directly mirrors how the code works (each tab has a prop like isActive). In other words, you are aligning with the implementation model rather than fighting Figma’s current limitations.

It is not the oneclick dropdown you are hoping for, but it saves you from exploding variant sets and makes the system more future-proof if the design system ever ties into code exports or tokens. Hopefully this helps


Thanks, that’s an interesting insight.

Our devs don’t tend to use the Figma logic so it’s really just for my benefit currently. 

I’d like to avoid each element having its own boolean option just for cleanliness/simplicity within the designs… guess I’ll keep waiting for Figma to evolve!


I’m rebuilding a load of our components, and was hoping to make a top navbar component that can display any nav item tab as selected without having to resort to making a variant for each item showing as highlighted.

 

I’d like to have a single navbar component, with a sub-component for the different states of the tabs (selected/unselected), and then just use whatever functionality Figma offers to allow a single dropdown to select the live tab.

I can see that it’s possible if I expose properties from nested instances, but that then means I display a full list of each menu item as a property, and all have to be switched off apart from the selected one, which is clumsy.

I’ve currently settled on an unsatisfactory compromise where I’ve build a single navbar component, and then made a nested component for just the tabs themselves. I still have to then make a variant for each of the nav items, albeit just for the tabs and not the whole bar. 

Is it currently possible to do what I’d like?

What you’re trying to achieve in Figma, having a single navbar component where only the selected tab highlights dynamically, is not fully possible without creating variants for each tab. While nested components and exposed properties help, they still require some manual toggling. A cleaner approach is using interactive components or swapping tab instances, though it is still limited. Much like designing comprehensive detoxification programs, it requires structure and multiple stages, there is no perfect one size fits all but careful setup makes it manageable.


Reply