How to use components in Adobe Xd | tutorial with examples

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
using components is one of the best ways to speed up your workflow in adobe xd and it also allows you to create some really cool interactions so in today's video i'm going to start from the very beginning with components we'll create one together and give it a few different states and even animate it then i'll give you a few tips and share some of the ways that i use components most frequently throughout my workflow [Music] so first things first what exactly is a component well a component in adobe xd is similar to symbols and other design tools and they're used in a really similar way so basically it is a group of elements that is grouped together and you can reuse it across your document and even across different documents if you save it into a library and this comes in handy because what you want to be able to do is edit just one main component and see those changes across multiple components throughout your document but you also want to maintain flexibility which is why you can create different instances of these components and even different states and then you can animate from state to state and this creates really nice micro interactions so that it really limits the amount of screens you need to design in order to prototype something so let's go ahead and make a component together so that you can see what i mean okay so we have this screen here and now what i want to do is make a component that is a list item for different types of foods so i'm going to do that now and i'll speed through this because i really want to get to the part about the component itself and what we can do with it [Music] okay so now we have all of these elements and i've kind of set it up like a template where i don't have real information in here but i more just have some guidance and some placeholder text and a placeholder mask for when i actually have the instances of these components so this main component will sort of just um act like a template for me so what i'm going to do is group this together and then i'm going to hit command k or control k for windows on my keyboard as a shortcut to make it into a component then once i do that the component is saved in my components section of my document assets so i can go in and name this i'm going to name it food list item and now i can actually drag this out as many times as i want and i can have you know tons and tons of these components i can also copy and paste i can do command c command v to copy and paste i can do the shortcut of holding down option and dragging and duplicating it in that way and all the while this is going to remain the main component and i know this because it has the filled in diamond as opposed to the outlined diamond so that is the indicator that this is the main component and because this is the main component whenever i make a change on this one like let's say i make this little indicator stripe red then you see it's going to change on all of them however if i undo that and then just make a change on one of the instances it will not reflect in all of the other components so you can see even if i have tons here i can just choose one and edit one of these instances and it will only edit that one instance which really comes in handy because you can choose whether you want to make a change that is global or make a change that is local so maybe for this particular example we want to have three different states one for when the food is fresh and we can make that our default state then maybe we want one for when the food is going bad like at risk of going bad so you have to eat it quickly or where it is completely spoiled and so let's create those states now so what we're going to do is tap into our component and go up to this section here where we see component main and there's a plus icon right next to the default state so we're going to create a new state and we will call this spoiled okay so then now that we are selected on the spoiled state meaning this is kind of highlighted in the light blue then we can make the change and it will only apply to that state so first we want to change this text and we also want to turn this red to show that it's spoiled so now we can toggle back and forth between these and so let's do that one more time we'll create a new one that is going bad you can really name these whatever you want depending on what project you're working on of course so i'm going to say about to spoil and we will make this the orange to show kind of like caution okay so now that we have these three states it makes it so much quicker for us to build out our page so i am just going to create a few more of these by duplicating them and i'm just making sure there's the same amount of space between each that's perfect and now when i go in i can just change a few of these and as you can see we now have all of these different state options in all instances of this component so that's what helps you save so much time when using components okay now let's get into something a bit more fun where we can actually animate between states so the states we just set up here you probably wouldn't animate between them like maybe you would do a color fade or something simple like that but i want to do something a bit more exciting so what we're going to do is actually change this component a bit so that we have room for what i want to do so what i'm going to do here is actually give us room for an icon to go over here so i'm going to get a trash icon and i am just going to add that here we will put the border down there and gotta make it big enough to be tappable we'll make this whole area top of a bowl around here okay and again i want to make sure this is actually inside of the component so i'm just going to cut and double click in and paste it in there okay perfect so now we'll give this a different color actually awesome and so now we can have all of these um list items here so now i'm going to prototype what it would be like to delete one of these line items so basically what we want is another state that is deleted okay perfect so now we want the deleted state to be where all of this stuff besides the um trash can we'll group that together so it's much easier we'll just call it list item and we'll call this trash okay we want for this list item stuff to slide that way and basically disappear and we also want for this to disappear and so that is going to look really nice and so now we have to kind of hover over bring this back we'll go back to um this one and what we're going to do is set up this animation so in prototype mode i just toggle to prototype mode up here what we're going to do is double tap until we get on to this icon that we want to have tapped and we're just going to click on it we don't need to drag it anywhere we just need to click on it in order to do an interaction between two different states as opposed to two different artboards so tap that's perfect we also like auto animate and the state is going to be deleted and i think 0.3 seconds is good maybe we'll do snap that might be nice and so now let's see exactly what this looks like if we preview it perfect as you can see that was really quick but it did work really nicely and you can do it with all of these now and so that is really fun and what i might do actually um so that it makes a little bit more sense is duplicate this artboard and whenever that is tapped then we might have a trigger that will so this will be disappeared then we might have something that will move all of this up and you can really easily do all of that using auto animate and all of that stuff but we won't get to that at the moment so that is how you create an animation between two different states of a single component and again the great thing about that is i can then have this on any other artboard and those same interactions will work exactly the same just to show you a few more examples of when i really like to use this um we'll put a hover state on this button and this button currently is on a mobile device but you would never do that on mobile you would obviously only do it on desktop for hover because you can't hover with your thumb but i will just for the sake of this example we will do that okay so i have this button here and i'm just going to group it and do command k in order to make it into a component we will name it button and as you can see now it is here in our oh that's not high usable button now it's here in our components library so now let's give this another state we'll give it a hover state and all i'm going to do in the hover state is just make this a little bit lighter this color cool and as you can see i have this weird thing here in order to make my scanning icon we'll just make that the same color too okay cool so now if we preview this and put it back to the default we'll preview this again [Music] and you can see here when i hover over it it is turning into that color and that's just a really simple way to use these types of interactions another way that i like to do this is with a toggle so again this wouldn't all be on one app screen i'm just showing you some fun examples we'll make it really big to get the point across here so to create a really simple toggle is so easy because we're just going to create kind of what it looks like here we will group this and make it a component and we will call this toggle and then we will make a new state and we'll just name it right because we want the toggle to kind of move to the right so we just literally double tap in there and move it to the right and maybe it changes colors when we move it to the right who knows and then we can set up interactions between these things so let's go into prototype mode and if we tap on here then we want it to snap over to the default state and then if we go back in design mode to the default state and then we tap on here we want it to snap over to the state on the right so now again let's preview what that would look like and there you go i just created a toggle in like less than a minute it is super super easy and you could get so much more fun and fancy with things like this i hope this was helpful if you're new to xd and wanting to learn more about components if you like this video you will definitely like my playlist of all of the xd tutorials that i have created so feel free to check that out give this video a like and hit subscribe if you haven't already thanks so much for watching and i'll see you guys in the next one bye you
Info
Channel: Maddy Beard
Views: 53,498
Rating: undefined out of 5
Keywords:
Id: hR4GWqO4WFg
Channel Id: undefined
Length: 12min 54sec (774 seconds)
Published: Thu Apr 15 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.