Separate component states from variants
Instead of managing all the different variations of a component using states, allow switching of variants with their own set of states. Technically you could add new components for each variant but being able to select a variant from a dropdown would be a neat way to organise groups of components and switch between their variants and associated states. An example would be having a solid button and an outline button as part of the same component, and these would have their own set of states when you switch between variants. This would be far neater than having states for each variant of button as well as their active, hover, disabled etc states.
As we haven’t seen a response to our question in over three months, I’m marking it as inactive. Please do feel free to file it again if you still want this feature!
Thanks,
-Elaine
-
David commented
To answer the question, you can't do it. Variant and states are not differentiate in a component. So please reopen this.
If you want an example, check Figma.
-
Alberto Schmidt commented
Figma just rolled this out
-
Melissa commented
Instead of managing all the different variations of a component using states, allow switching of variants with their own set of states. Technically you could add new components for each variant but being able to select a variant from a dropdown would be a neat way to organise groups of components and switch between their variants and associated states. An example would be having a solid button and an outline button as part of the same component, and these would have their own set of states when you switch between variants. This would be far neater than having states for each variant of button as well as their active, hover, disabled etc states.