Hey everyone, hey, we've got an existing design button system here... it was built at a time before Figma had component properties... and there'll be lots of times, either with your own existing work... or documents from the community... where you want to go through and say... actually, I want to combine it down and use component properties...
it's going to allow us to do something like this... where instead of these many buttons all we need is these many... which is handy, both us, for organizing... and for the people using our buttons in the team... but really the video is, I want to show you the kind of shortcuts... to be able to make these updates in bulk, quickly...
whereas up until now we've been building them as we go... kind of working on individual parts... so bulk changes, bulk updating, and a good example... of updating previous files... to kind of a newer fancier format, all right, let's jump in. What we'll do is we'll work on this one together, from the Community...
if you do a search in the Figma Community for material design button... probably add the word "Merve" and you'll get here... thanks, Merve, and open it in Figma... if you can't find it I'll leave a link in the bottom of the class projects... there is a link there to it, directly... open up a version for yourself, and we'll see how much we can cut down...
plus we'll show you some of the shortcuts to make this easier and less painful. So let's go to the Button Variants page... and what we're going to do is try and... like we could work on this whole thing, but we'd be at this for a while... it takes a little bit of time to kind of reconfigure an existing design system... so what we're going to do is just tackle this bit...
and I'll show you some of the shortcuts... if you're having to tackle it yourself. There's nothing wrong with this, it's just quite big... I picked this one because it has left and right icons... which is going to make a good example... and what I'm going to do is...
because this is an existing design system that other people might be using... I might just leave this alone... and make another version. So I'm holding down the 'Option' key, 'Alt' on a PC... to leave this alone, it might be in a shared library... I don't want to mess with it...
what I'm going to do is, hopefully cut down... this lot, actually, we'll put them over here... so we can be all amazed at how much we saved... so we shouldn't need these ones, right? I need just one version, and what I probably need to do is... add both arrows in, so I can easily have...
none, right arrow and left arrow, by using our Boolean toggle. So these are all instances at the moment... I'm going to break them apart using 'Command Option B', or 'Ctrl Alt B'... now they're just auto layouts, let's turn them into a component... don't open... does everybody do that, 'Command Shift K' is, bring an image...
what I want, 'Command Option K'... and that's not even what I want either... I want to say, all of you guys, I want to make you into a component set... we could make multiple components and then combine them as a variable... which makes a component set, up to you... I'm just going to go undo and go straight to my component set...
with a bunch of variables in it. Let's have a look, so what I want to do is... it's a little bit of copy and pasting, let me show you some shortcuts... because I need this, right-- left arrow... to be in with this one, so I'm going to hit 'Enter'... to dive inside of the parent, and hit 'Paste'...
and then I can use my left arrow to kind of toggle amongst the siblings... now I want it for all of them, what I'm probably going to do is go-- if you click off, I'm going to click once, hit 'Enter'... and that selects all the siblings, I'm going to copy it, same for this... 'Enter' on my keyboard, select the siblings, delete it... click it again, hit 'Paste'... and I'm going to do that for all of these...
I'm going to do it in speed mode, you wait there. I feel like there was a faster way of doing that... let me know in the comments if you're like, "Hey, why don't you just do it this way?" everyone else, have a look down there to see... if there was a better way of mass producing that. So we've thrown everything in there... now what we want to do is add all of our various component properties...
and what we're going to do now is not do them individually... we've been going inside and finding this, and going... finding the layer and saying... on the layer I'm going to have a Boolean, where I say On and Off... what we can do is actually grab the component set and just do it to this... we're going to add everything in one big go, and then go through and add it.
So what do we need? We need a couple of things... we need some properties here, now when you've got the whole thing selected... you've got just this one Properties option... Layer doesn't have it specifically, so what we can do is, we can say... let's have a Boolean...
this one's going to be called "Icon Left"... I'm going to have another one... it's going to be "Icon Right"... because that's something I want to turn on and off for them... I probably want to do something with the text to say... text is going to be "Button Text"...
apply that, don't hit Enter... Create Property, other things I want, I'm going to need... I've already got one property here, let's edit this and say... this is going to be my "State"... and I want another one that's going to be a variant... remember, before, we worked out we can't do size and color...
so we're going to-- oh, don't hit that one... we're going to do a variant that is to do with the size. So let's go and apply it now... so I've got this, let's click on this one here, use our sweet target... and say, I would like to apply the instant swap... I don't have another instance...
we could add that, but at the moment, in this document here... there's actually only two... and I don't need to swap this out, I just need to turn it on and off... so not this one, I'm going to find the layer, and say I want the Boolean of Icon Left, to turn on and off... can you see that, you kind of added it to the component set... and now we can go through, and easily and quickly, say...
actually, I want the one that says Right, rather than creating it as we go... text again, click on this... I want the text to have, under 'Content'... and because we've already made it, when we click on it... it doesn't make a new one, it says, "Oh look, there's already one"... you can make a new one but there's that one.
Size wise, it's these ones here... actually, state wise is going to be Default, that's what I want... this one here is going to have a new value of "Hover"... this one here is going to have a new value of... "On Click"... when you click, kind of goes dark, and there'll be a Disabled or Inactive...
so let's add another State, and this one's going to be "Inactive". Next one we want is Size, so we're going to say, all of you fellas are size of... Default, no, you're going to be "Large", or just "L" even... you are all going to be a size of... you get the idea now, I'll speed this bit up. 'Shift I', I've got my button, I'm going to drag it out...
and hopefully now, I've got the different states... I've got the different sizes which I need to play around with Layer order here... but I've got Icon Left and Icon Right... and I can change the "Button Text". So we've gone from this chunk here to just this one here... which is really nice and tidier...
and it's a nice way to tidy up previous... existing design systems that you either get from somebody else on the Community... somebody else in your team, and one of the biggest things we can do is... we can do a lot of things in bulk by just applying them to the component set... and then using lots of our kind of nice shortcuts where we can... use this little Target to select them all and apply them all in bulk...
ideally, you'll add component properties as you're making them... but there's going to be lots of legacy stuff around... that were just built before this wasn't a feature in Figma. So there you go, updating an existing design system... and adding your component properties on top of them... all right, that is it, I will see you in the next video.