Back to Plugins
Variant Switcher

Variant Switcher

Recursively changes component instances to a different variant based on the specified property.

themedark themepropertiesvariantspropertycomponents

Plugin Preview

Variant Switcher preview

About this plugin

The Variant Switcher plugin recursively changes component instances to a different variant based on the specified property.


If you have a lot of different components in your design system that share a same property (e.g., "theme"), you can use this plugin to switch them to the same property value (e.g., "theme=dark theme").


Video tutorial on YouTube.


Usage

The Variant Switcher plugin has three main input fields:

  1. Property Name: the property you want to change
  2. From Variant: (Optional) the current value you want to target (leave blank to select all instances with the selected property regardless of the current value)
  3. To Variant: the new value you want to set the property


And a few advanced options:

  1. Deep Switch: When unchecked, the plugin will not switch children after switching parent instance. (Diagram explanation)
  2. Switch Full Document: When checked, the plugin will traverse through the entire document. When unchecked, the plugin will only switch the current selection, or the current page if nothing is selected.
  3. Exact match: Whether to do an exact match or a fuzzy search
  4. Plugin stays open: Whether the plugin will stay open after clicking "Switch variants"
  5. Main Component Name: (Optional) Change only instances with the specified main component name


Contact Us

  1. 🐛Bugs report or feature request? https://github.com/etn-ccis/blui-figma-plugins/issues
  2. ✉️General inquiries? [email protected]
  3. ❤️ Visit our home page! brightlayer-ui.github.io


Plugin Details

Version9
CreatedMay 4, 2021
Last UpdatedFebruary 27, 2025
Categoryediting & effects plugins
CreatorHuayun
Stats1303 installs, 96 likes
PricingFree

Technical Details

  • API:1.0.0
  • UI:dist/ui.html
  • main:dist/code.js
  • Document Access:dynamic-page
  • Editor Types:
    figma
  • Allowed Domains:
    • none