Transcript for:
16 – Creating & Publishing Component Libraries

hey everyone welcome back and in this module I'd love to quickly share with you what it means to create and publish a component library in figma a component library is nothing more than a file with published items inside such as components or variables or Styles or any other reusable object we'll talk soon all about variables and styles and all of those things as we go but for now let's focus on creating a file with a component inside that we'd like to publish out so I'll jump in figma all right I'm here in figma and at the center I have a button component it's one that we've been working with through the last few modules and ideally I'd love to publish this out so that others and other files can use this component in their work that's the idea we're publishing these components for others on our team to use to help make their designs and experience more consistent so how do we do it in a file where we have components that we want to share out for others to use we'll go over first to the asset panel on the left hand side now again the asset panel is where we can browse all components for libraries that are enabled or or we can choose to publish libraries from this panel as well in this case we'll go ahead and click the team Library icon here and on the right you'll see the library name or the file name in this case this file is called 16 publishing component libraries that's okay we'll leave that for now and you can see that inside of this file here well we have a few components and you can see that name reflected here right next to the publish button and again this is because we're essentially publishing this file as a team library that others can use so here's what that flow looks like I'll go ahead and click publish and this will allow me the chance to see all of the components or things that I'm publishing now figma will show a list of everything that's been added or modified or removed here in this model now if I'd like I can also choose to add a description of what's changed in this case we added a button so I'll type in added and button and then I'll go ahead and choose to publish this library or this file that has a component inside now figal will compile that and let us know when it's finished down here at the bottom now what this practically looks like is I'm here in another file and I'd love to use that button that we just published in the other Library except when I go into the asset panel here in this file well I don't see any libraries yet and I certainly don't see that button but that's okay because fig tells me that I can browse team libraries to find any components or assets I might be looking for now in the current file we don't see anything but if I were to navigate up here and choose your teams I can see all of the available team libraries that are available inside of my team Baseline design if I click here I can get a quick preview of everything that's available and yeah it looks like this is the button I'd like to use so next I can just choose add to file now this Library will be available over here in the asset panel and if I close out of this here and click inside the Library I see that button from here I can choose to click the little three which will show all of the included variants and gives me a preview of this component and I can choose to insert the instance or or drag it right out from the assets panel itself now let's imagine we're going through a redesign and I'm back here in this library and we've decided that hey we're no longer using rounded buttons actually we're converting them all to squared buttons so I is the Design Systems designer I go in here and I choose to maybe modify all of these from not a rounded Corner radius but instead something that's a little more squared like 16 or so and so I've effectively made a change to this component but of course when I go to the other file I don't yet see that change so here's how this workflow operates if I look to this file here where our component originates from you'll notice a blue dot on the team Library icon this indicates that something in this file is changed and it's ready to be published out if I click on this here I can see that familiar modal and if I click publish I can see okay it looks like the button component has been modified and before publishing if I'd like I can choose to add a description of what changed maybe in this case I'll type rounded 2 squared and we'll go ahead and click publish here just letting designers know when they pull these updates what can they expect now we'll go back into that other file and right away I noticed there's an update available there's two ways that I can see this the first is in that team Library icon again lets me know something's new or ready to be updated in this file and the other way is by selecting this instance here on the right hand side I notice there's a little update available icon and if I click this there's a few ways that we can update this component here or this instance the first is I can simply just pull the update now if I choose to review the update thma shows me a new model and I think a pretty helpful interface to see what changed on the left here we have the current instance and of course it's a little more rounded whereas on the right we have the updated instance that's of course more squared now in this case it's super obvious to see what changed we're going from round to square but if it ever weren't as obvious you can always choose the overlay option here which will show you a slider and so we can see on the left this is the previous version and on the right this is the current version so now it's much easier to see what's changing if I feel okay about this I can go ahead and choose update instance here in the file and now I can close out of this I should say too you can always undo an update so if I just hit command Z to undo the update we're back to the component not being updated and there's still being an update available I wanted to undo that change because if I click into the team Library icon here you'll see a model where we can see all of the updates that are available for this file and what's really nice is at the top here you'll notice that update or that commit message that I had added just a few moments ago in this case we said rounded to squared now again we'll go ahead and choose update all or we can update one by one whichever makes sense and now our canvas is updated with the latest version of that component so that's all there is to it basically a component library is a file with assets that we want to allow others on our team to use these assets can be components they could be variables they could be Styles a whole number of things here in figma when we were ready to publish we just clicked into the asset panel and found that team Library icon and then chose to publish them and of course in our file we wanted to use those components and so just like we did we chose the asset panel clicked on the team Library icon and then found the library that we wanted to add here in our file we could also of course click into this Library here and see all of the components or reusable items that were available now the last thing I'll mention quickly is that if you ever would like to unpublish a library maybe you're deprecating a bunch of components or perhaps the library is just no longer useful you can always do so by going into the library and choosing that team Library icon again only this time instead of choosing publish we'll click in here and we can see a button at the bottom that says unpublish if I click this we will remove this library from being available now if we choose to unpublish this Library it won't break any instances in other libraries that we have rather they just won't be available to find again and of course there will never be any updates available because the library's been unpublished but they're still here they're still connected and we can still use all of their available options but you'll notice we no longer have a library that's available for use in this file because it's just been unpublished all right that's it for this module talking through component libraries how to publish them and how to find those components in other files a quick one but I hope this one helps As you move forward inigma and perhaps even build some of these libraries out on your own all right with that as always I'll see you in the next module