<<<<<<< HEAD
A powerful Figma plugin that automatically adds the filename of imported assets underneath them, making it easier to match designs with the corresponding files in your source folders.
Designers often import multiple assets into Figma from their local file system. Over time, it can become difficult to remember which design element corresponds to which file. This plugin solves that problem by automatically labeling each imported asset with its original filename.
- Deep Frame Search: Automatically finds all imported images at any nesting level
- Smart Text Placement: Places labels directly underneath each asset with proper centering
- Adaptive Text Styling:
- Font size scales proportionally with asset dimensions
- Text color adapts to background (light text on dark backgrounds, dark text on light backgrounds)
- Selective Labeling: Label just selected assets or all assets on the page
- Customizable Settings: Control appearance and behavior through the settings panel
-
Asset Detection:
- The plugin scans for imported images (both direct IMAGE nodes and shapes with image fills)
- Recursively searches through nested frames, groups, and components
- Identifies assets by checking for image types and image fills
-
Smart Labeling:
- Creates text labels with the asset's filename (minus the extension)
- Positions labels directly underneath each asset
- Centers text perfectly relative to the asset width
-
Visual Adaptation:
- Calculates font size proportionally to asset dimensions
- Small assets get smaller text
- Large assets get larger text (up to 400px for very large assets)
- Detects background darkness using luminance calculation
- Uses light text (#FBF9F8) on dark backgrounds
- Uses dark text (#252427) on light backgrounds
- Calculates font size proportionally to asset dimensions
- Figma Plugin API: Core platform for accessing Figma's document structure
- JavaScript: All plugin logic is written in vanilla JavaScript for maximum compatibility
- HTML/CSS: Simple UI for settings panel
- Custom Algorithms:
- Recursive deep search for nested assets
- Proportional font size calculation
- Background luminance detection for adaptive text color
- Download the plugin files from this repository
- In Figma, go to Plugins > Development > Import plugin from manifest
- Select the
manifest.jsonfile from this repository - The plugin will be available in your development plugins menu
- Select one or more imported assets
- Run the plugin from the Plugins menu
- Choose "Add Names to Selected Assets"
- Text labels will appear below each asset
- Select a frame or group containing imported assets
- Run the plugin
- Choose "Add Names to Selected Assets"
- All imported assets inside the selected frame(s) will be labeled
- Run the plugin
- Choose "Add Names to All Assets"
- All imported assets on the current page will be labeled
- Run the plugin
- Choose "Settings"
- Adjust parameters as needed
- Click "Save Settings"
- Auto-Detection on Import: Automatically label assets when they're first imported
- Enhanced UI: More intuitive settings panel with live preview
- Text Styling Options: Font family selection, weight options, and additional color schemes
- Position Options: Allow labels to be placed above, left, or right of assets
- Template Support: Save and apply different labeling templates for different projects
- Batch Renaming: Rename multiple assets with patterns or numbering schemes
- Layer Organization: Automatically organize labeled assets into groups or sections
- Export Mapping: Generate a mapping document showing asset names and their positions
- Asset Management Integration: Connect with DAM (Digital Asset Management) systems
- Version Tracking: Track and display version information from linked files
- Team Collaboration: Share asset organization schemes across team members
- Smart Suggestions: ML-based suggestions for organizing and naming assets
manifest.json: Plugin configuration and metadatacode.js: Core plugin logic for asset detection and labelingui.html: Settings interface
- Clone this repository
- Make changes to the files as needed
- Test by importing the plugin into Figma
- Submit pull requests for new features or improvements
Contributions are welcome! Please feel free to submit a Pull Request with new features, improvements, or bug fixes.
This project is licensed under the MIT License - see the LICENSE file for details.
- Figma for their comprehensive Plugin API
- The design community for inspiring this tool
- All contributors and testers who helped improve the plugin
5ecb618 (Version 1 of the Frame Name Figma Plugin)
