Back to Plugins
Component Inspector

Component Inspector

Component properties as they would look in code.

web componentscomponent propertiesvuehandoffangularreactdevelopercodetypescriptdesign systemcomponentscode-generators

Plugin Preview

Component Inspector preview

About this plugin

Component properties as they would look in code. Code on GitHubThis plugin provides a look at Figma component properties similar to how they are described in code. This plugin does not generate style code. It generates code that describes component properties.Currently supporting instance and component code generation for:React function componentsAngular componentsVue components (both option and composition APIs)Web componentsAs well as:JSONWould love to hear from you about what works and what doesn't!Conventions / Pro TipsSlotsCurrently, this plugin supports tag-named slots. Add the --SLOT[tagname] suffix to the name of a text component property in Figma and it will generate a slot for that attribute. For example, if you create a component with a text property named "heading--SLOT[h2]", it would generate the following React instance and definition code:My slot content} /> const Component: FC<{ heading: ReactNode; }> = ({ heading }) => <>{heading}; The tagname will default to span if you use the suffix --SLOT without a tagname. If your Figma component has a single text property, it will be treated as a generic slot.This can be configured by running the Component Inspector > Configuration command.Boolean visibilityIf you have a boolean Figma component property that controls visibility of a text or instance swap property (or one of their ancestors), that boolean property will be ignored in generated code and the text or instance swap property will disappear when the boolean is false."undefined" variant options and instance swapsIf you have a variant option property that defaults to the string "undefined", that property will be treated as truly optional (no default).If you have an instance swap property that defaults to a component named "undefined", that property will be treated as truly optional (no default).This can be configured by running the Component Inspector > Configuration command.Ignored property prefixYou can configure the component inspector to ignore properties named with a provided prefix.This can be configured by running the Component Inspector > Configuration command.Numeric variant optionsIf your variant options are all numeric or if the default value for a text property is numeric, the generated code will treat it like a number type property.

Plugin Details

Version23
CreatedOctober 14, 2022
Last UpdatedSeptember 11, 2023
CategorySoftware development
CreatorJake Albaugh
Stats2912 installs, 596 likes
PricingFree

Technical Details

  • API:1.0.0
  • UI:dist/index.html
  • main:dist/code.js
  • Editor Types:
    dev
  • Allowed Domains:
    • none
  • Codegen Languages:
    • Angular(angular)
    • JSON(json)
    • React(react)
    • Vue: Composition API(vue-composition)
    • Vue: Options API(vue-options)
    • Web Components(web)