When using Interactive components, I want to be able to create a “master” variant.
For example:
I have a blue primary button with square edges. When I create this component, I want to assign this as the master variant.
I now want to create a hover state, so I make a new variant. I change this so my hover colour is a lighter blue.
I copy the process for all of my different variants and properties of my button states.
A few weeks down the line, someone asks that the buttons now have rounded corners.
Currently, I have to go in and change every single variant individually, but I want to be able to change it in once on my “master variant”. Providing that I haven’t made any overrides on the border radius on the other variants, they should all be updated.
We’ve done something similar, but are finding the best ways to do that across multiple applications. Currently, we’ve designed it where we just have single component masters, then make a variant from that instance.
Don’t know if we’re doing that correctly as I’m reading in various other places that we shouldn’t nest components, it’s worked ok so far. I’d be down with an option like this in the form of a check box that could denote which variant the main one is.
Bonus: One quick way to edit radii I’ve found is by holding ctrl/cmd + clicking the backgrounds in each variant and changing them all at the same time.
This might help, but I’m not sure your situation is related to Interactive Components.
You can also use Atomic Design. Like plate components for example, that hold the color and border radius information and can be used in multiple component sets.
Yeah this is more of a variants thing than an interactive components thing specifically.
Technique my team has been using is to create a single master component that covers all variants outside the variants, then nest this within the variant components and override to create your variants. Only way I know of as of now to get the benefits of master (update once, applied everywhere) with the power of variants (codified states)
It would be cool to be able to designate a single variant as a “master” component though, because something I find happening to me often is that I start creating variants on a component that contains text, etc. and then once I’ve made about 8 variants I realize I need to change the text… except now it has to be done everywhere.
I agree that having possibility to have some kind of master within variants would be really useful… especially if you do master within master within master…
and it… works
but it is only sufficient if I don’t have to change to constraints in every variable, because to do that I have to click on every single variable (or make some workaround with plugins)