Hide styles, components, and variables when publishing
Who can use this feature
Supported on paid plans
Anyone with can edit can remove styles and components from a library
New to components? Guide to libraries →
There are a couple of ways to remove a style, component, or variable: you can hide it when publishing, or delete it entirely.
Are you a member of an organization? Use Library analytics to track component usage, including when components are detached.
Hide a style
Hide a style when the style is already published
To hide a style when it is already published in a library, you need to unpublish it. You can only hide a style from the original file where the style is defined.
You can access the original style from any object that is currently using it:
- Select an object in the canvas that uses that style.
- Click on the style in the right sidebar
- Click the icon to edit the style.
- Click Go to style definition to open the style in the library.
Note: You will also see an option to Move style definition into this file. This allows you to edit or delete that style without leaving the current file. Moving a style removes it from the original file. If you re-publish the original file, the style would no longer be included.
Hide a style when publishing it for the first time
You can hide a style from a library without deleting the style itself. You can only do this from the original style, the style definition.
- Open the file where the style lives.
- Click Assets in the left sidebar, then click to open the library modal.
- Click Publish # changes.
- Right-click the style and select Hide when publishing.
- Repeat for any other style you want to unpublish.
- Click Publish to apply your changes and remove the styles.
Note: If the library is published and up to date, you need to make changes to it to remove the style. Make changes to a library by editing or creating a main component or style. Then follow the instructions above starting with step 2.
Delete a style
If you don't want to use a style at all, you can delete it. This won't update the properties of any layers using those styles, but will detach them from the style. You can only delete the style definition in the file it originates from.
- Click an empty spot on the canvas or press Esc to deselect all layers.
- From Local styles in the right sidebar, select one or more styles:
- Hold down Shift and click to select a range styles
- Hold down ⌘ Command / Control and click to select multiple non-adjacent styles.
- Select Delete style or Delete all from the options. Figma will remove the style and you will no longer be able to use it.
- Publish your changes to your library.
Hide a component
You can hide components when you publish your library. You can only hide components from the file they originate from.
Note: You can open the file for any component from any file with access to those components. Right-click on an instance of that component in the canvas and select Go to Main component.
- Open the library file which contains your main component.
- Open the Assets panel in the left sidebar.
- Right-click on the component and select Hide when publishing.
- Figma will move the component(s) to the Hidden section.
- Publish the changes to your Team library.
Tip: You can also quickly remove a component from your Team library via the Layers Panel. Add a period .
to the beginning of the component's name.
Hide a variable
Like styles and components, you can hide variables when publishing your library. You can only hide variables from the file they originate from.
- Open the library file where the variable is defined.
- Click an empty spot on the canvas or press Esc to deselect all layers.
- From Local variables in the right sidebar, click the Open variables icon.
- From the Variables modal, find the variable you’d like to hide and click the Edit variable icon at the end of the row.
- Check the Hide from publishing box and publish your changes.
Hide a variable collection
To hide an entire collection of variables from publishing to team libraries, prefix the collection name with _
or .
. For example, rename a Tokens collection to _Tokens
or .Tokens
to prevent it from being published. Remove the prefix to unhide it from publishing.