: Sketch shared styles with variant properties (e.g. Green / Red / Blue + same drop shadow) Is there a way to make a variant of a shared style in SketchApp? I have a view with 4 'pricing'
Is there a way to make a variant of a shared style in SketchApp?
I have a view with 4 'pricing' cards, which I want to share properties across like gradient, drop shadow, etc. etc. etc.
But I want them to have different background colours, and maybe other small differences.
Obviously I could just manually match the styles without a 'shared style' library, but, out of academic curiosity, is it possible to make derivative variants?
Or maybe just a 'shared single property' instead of a 'shared style' group?
More posts by @Turnbaugh909
1 Comments
Sorted by latest first Latest Oldest Best
You can do that using nested symbols.
The idea is creating a main symbol (N) that contains others symbols (N-1). Then, you can define variants for each sub-symbol (N-1).
For example, in your pricing symbol, if you want your background being switchable, it has to be a symbol itself.
Create your main symbol
Convert each element you want to be switchable to symbols (here are the sub-symbols)
Duplicate each sub-symbol and apply your variants. Important : each type of symbol must be the same size EX : title gray size = title blue size = title green size. This way, Sketch can detect them as variants.
Now you can go back to your artboard and import the main symbol. In the right panel, you'll se dropdowns and input. There are the symbol overrides where are listed all the variants. jmp.sh/d0Fi3Yd .
Hope that helps !
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.