Publish styles and components to a library
Before you start
Who can use this feature
Publishing styles is supported on any team or plan. Publishing components is only supported on Education, Professional, and Organization teams and plans.
Anyone with Can edit access to the file can publish styles and components to a library.
New to components and libraries? Learn more about components → Learn more about libraries →
When you first create styles and components, you can only access them in file you created them in. To use them in other files or projects, or share them with collaborators, you can publish them as a library.
Libraries allow you to publish any styles and components you create a shared repository. Every file you publish corresponds to a single library.
You, and other members of your team or organization, can browse published libraries via the libraries modal. Access the libraries modal from your drafts, as well as any team or organization files.
Caution: Libraries are a paid feature. If you're working in your drafts, or are part of a free Starter team, you won't have access to all the functionality of libraries.
You can still create and use components on a Starter team, but you can't publish them to access them in other files.
- Publish styles in your drafts, or on any team or plan.
- Publish components in Professional or Education teams, in Organizations.
Publish styles and components
You can choose exactly which styles and components you want to publish, by creating private components in your file, or removing styles and components during the publishing process.
Every time you publish to your library, you'll be prompted to add a description. This allows you to communicate decisions and changes to the people who use your library. Figma will include this description alongside a new checkpoint in the file's version history. Descriptions will also be displayed when accepting updates from a library.
Open the Library modal
The library modal allows you to find, view, enable, and publish libraries. You'll publish any new libraries from the libraries modal, as well as any changes or updates to existing libraries.
There are a few ways to access the library modal from within a file:
- 1
Editor toolbar
- Click on an empty spot in the canvas to deselect.
- Click the next to the file name in the toolbar.
- Select Publish styles and components from the options.
- 2
Assets panel
- Click on the Assets panel in the left sidebar.
- Click the to open the library modal.
- 3
Use the keyboard shortcut
- Mac: ⌥ Option 3
- Windows: Alt 3
Tip! If you're a team or organization admin, you can choose which libraries are available to members by default. Learn how to enable libraries in teams and files →
Publish to library
To publish styles and components to a library, you will need to open the library modal from the file where they live.
- Open the Library modal via any of the methods above.
- In the Current file section, click the Publish button to publish the file.
- Add a description of the library's purpose, or any decisions or changes, using the field provided. This description is shown in Version History, and when accepting updates.
- To review the styles and components, click the arrow next to Styles and components heading.
- To remove any styles or components, right-click and choose Remove from library.
- When you've finalized your styles and components, click the Publish button. Figma will show a notification to confirm your file has been successfully published.
Note: If you are a member of an Organization, you can also choose to share the library with your organization. This will allow other members of the organization to find and use styles and components from this file.
Check the box next to Allow any member of organization to access this file before you clickPublish. Learn how add and remove libraries in an organization →
Create private components
If you have components that you don't want to share, or are still a work in progress, you can make them private components. There are two ways to create private components:
- 1
Add a prefix to the component name
To prevent Figma from publishing your Components, you can add a prefix or modifier to the component's name in the layers panel.
Figma will skip over any components using this modifier and exclude them from the publishing process. Figma will also list them in the Private to this file section in the Assets panel and the library modal.
- Add a period
.
in front of the component layer's name. - Add an underscore
_
to the beginning of the component layer's name.
Note: If you add a period or underscore after a component has been published, Figma will remove it from your library the next time you publish changes to the library.
If you want to publish these components at a later date, you will need to remove the prefix and then publish the components individually.
- Add a period
- 2
Remove via the assets panel
- Click on the Assets panel in the left sidebar.
- Right-click on the component in the list.
- Select Remove from library from the options.
- 3
Remove during the publishing process
You can also remove components from the library modal during the publishing process.
- Open the library modal using any of the entry points above.
- Click the arrow next to Styles and components to view a list of included styles and components.
- Right-click on the component in the list and select Remove from library.
Publish updates to a library
If you make changes to a published style or component, this will only apply those changes to instances in the current file. If you want those changes to be reflected in your library, you will also need to publish those changes to the library.
Figma will let you know if there are any updates that need to be published:
- A blue dot will appear on the icon in the Assets panel of the left sidebar.
- A toast notification with a prompt to Publish changes to your team library.
Clicking on either of those options will open the library modal and allow you to review and publish your changes.
Publish individual styles and components
If you are missing styles and components from a published file, or want to add more styles and components, you can publish these individually.
The fastest way to do this is via the Assets panel in the left sidebar.
- Click on the Assets tab in the left sidebar or use the keyboard shortcut:
- MacOS: ⌥ Option 2
- Windows: Alt 2
- Scroll down to the Private to this file section, which will list any components that exist in the file, but haven't been published.
- Right-click on the component and select Add to Library. If you have made the component private using the
.
or_
prefix, you will need to remove this. - Figma will notify you that your updates are successfully published.