Custom Figma Plugin — Bulk Layer Renamer (Regex)

I built a Figma plugin that bulk‑renames all sublayers inside the selected frames using a regex match + rename template. It standardizes layer names into a canonical path required by our Angular pipeline.

How it works

  1. Select frame(s) in Figma.

  2. In the plugin, enter:

    • Match: the layer name to replace (supports regex).

    • Replace with: a template that defines the new path.

  3. Click Rename. The plugin scans all sublayers in the selection and applies the new names wherever the match succeeds.

Example

  • Match (regex): ^(head|top|bottom)$

  • Replace with (template): $1/type98/tone02

  • Resulting names:

    • head/type98/tone02

    • top/type98/tone02

    • bottom/type98/tone02

Why this matters

  • Enforces a consistent naming convention (e.g., head/type98/tone02) for reliable export and iteration in Angular.

  • Eliminates manual renaming across hundreds of layers and frames.

  • Keeps non‑matching layers untouched; only targeted names are changed.