Stray Component & Variable Finder (Ghost, Unindexed, Orphaned, Etc.)
Search find and fix unused, orphaned, or unindexed library components & variables in your file
Plugin Preview
About this plugin
What is this plugin good for?
This plugin makes it easy to identify ‘stray’ component or variables within a design file.
What is a ‘stray' component/variable
A stray component or variable is one that either:
(1) is no longer properly linked to its original library (because the library was removed or changed), or
(2) was left behind from a previous library you no longer want to use.
Figma often identifies these in your assets panel as libraries that are ‘used in this file’ but they does not give you any indication of WHERE in the file they are being used. This plugin makes it easy to identify these components.
𖨠𖨠𖨠 If you find this plugin useful, and you feel like it, throw me some coffee dollars. 𖨠𖨠𖨠
How do I use this plugin?
1. Identify libraries you want to keep.
Start by opening the file where you want to find and fix stray components or variables. In the Assets panel, review the libraries that are currently being used in the file.
2. Index the libraries you don't want flagged as stray.
Open the plugin inside each library file you want to keep.
In the Library Manager tab, click "Index Library" for each one.
This ensures that components and variables from these libraries won't be flagged as stray later.
3. Return to your target file and run a scan.
Go back to your target file. In the plugin, open the "Scan Components/Variables" tab and choose whether you want to scan for components or variables.
The plugin will search your file for anything not included in your indexed libraries.
4. Review the results.
You'll see a list of all stray components or variables it found, along with helpful details like node names and their location in the file.
More Specific FAQ Questions
What is the difference between Variable View and Node View for variables?
Variable View:
Organizes the scan results by each specific stray variable.
You can see all the places across your file where a particular stray variable appears.
Node View:
Organizes the scan results by the nodes that have the most stray variables.
This helps you prioritize fixing nodes with the highest number of issues, regardless of the variable types.
The scan is identifying components that belong to one of my indexed libraries as a Stray, what’s going on?
The most likely answer is that the component was deleted from the library. When this happens the component in the target file will point to its original library but does not actually exist there any longer (and therefore was not indexed)
Why can’t the plugin identify the library the stray component/variable comes from?
The Figma Plugin API does not expose data about files you own or have access to, so there is no way to get this information without adding an Authentication flow
Why can’t the plugin display the name of each variable in the results list?
Similar to the answer above, the Plugin API cannot get the name of variables from files that it does not have access to. It can only access the local name of the variable which tends to be semantically meaningless. Sorry.
Can I scan for both components and variables at the same time?
No, you’ll need to run the scan separately for components and variables. Maybe this could come in a future update.
Do I need to re-index libraries if they change?
Yes. If you update a library (e.g. delete or rename components/variables), it's a good idea to re-open that file and click “Index Library” again to make sure your scan stays accurate.
How long does the scan take?
The indexing and scanning process should be relatively quick (~3 to 30 seconds) generally; however the processing time is related to how big of a file you are scanning.
Plugin Details
Version | 1 |
---|---|
Created | May 1, 2025 |
Last Updated | May 1, 2025 |
Category | File organization plugins |
Creator | Travis Tinney |
Stats | 14 installs, 15 likes |
Pricing | Free |
Technical Details
- API:1.0.0
- UI:dist/ui.html
- main:dist/code.js
- Document Access:dynamic-page
- Editor Types:figma
- Allowed Domains:
- none
More Like This
Discover other plugins in the File organization plugins category.