0
100
200
300
400
500
600
700
800
900
1000
1100
0
100
200
300
400
500
600
700
800
900
1000
1100
Figma plugin#18 in Dev Handoff

Component Inspector

Component properties as they would look in code.

by jake

users
17K
likes
601
saves
3K
comments
28
FreeWorks inFigma DesignDev Mode
Price
Free
Latest version
v23 · Sep 11, 2023
First published
Oct 14, 2022
Publisher
jake
Features

What Component Inspector does

Summarised from jake's description on the Figma Community.

  • As well as

    JSON

  • Slots

    Currently, this plugin supports tag-named slots.

  • Boolean visibility

    If you have a boolean Figma component property that controls visibility of a text or instance swap property (or one of their ancestors), that…

  • undefined" variant options and instance swaps

    If you have a variant option property that defaults to the string "undefined", that property will be treated as truly optional (no default).

  • Ignored property prefix

    You can configure the component inspector to ignore properties named with a provided prefix.

  • Numeric variant options

    If 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…

  • Manifest

    Code generation

    Generates Angular, React, Vue: Composition API, Vue: Options API, Web Components, JSON in Dev Mode.

  • Manifest

    7 quick actions

    Run from the Actions menu (Cmd/Ctrl + K): All, Angular, React, Vue and 3 more.

On this page
Overview

About Component Inspector

Component Inspector is a free Figma plugin published by jake in 2022. It works in Figma Design and Dev Mode and has 16,755 users and 601 likes on the Figma Community. It ranks #18 in Dev Handoff and #20 in Design Systems on our lists.

In the developer's words

Component properties as they would look in code. Code on GitHub

This 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 components
  • Angular components
  • Vue components (both option and composition APIs)
  • Web components

As well as

  • JSON

Would love to hear from you about what works and what doesn't!

Conventions / Pro Tips

Slots

Currently, 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:

<Component heading={<h2>My slot content</h2>} />

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 visibility

If 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 swaps

If 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 prefix

You 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 options

If 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.

Changelog

What's new

Version 23 · released Sep 11, 2023

  • variant option casing and fixes bug for optional naming setting. pushes for camel case if no hyphens or underscores present in string.
Trust

Permissions and privacy

Network access

Component Inspector declares no network access, so it runs entirely inside Figma and can't send your file anywhere.

Extra permissions

None beyond the standard access to the file you run it in.

Read from the plugin's published manifest.

Rankings

Where Component Inspector ranks

Compare

Component Inspector alternatives

  1. 1

    Zeplin

    by Zeplin Crew

    291K users2.9KFree + paid features

    Design tools are for designing. Zeplin is for clear, structured design delivery.

  2. 2

    Measure

    by Philip

    158K users3.2KFree

    Add measurement lines and additional helpful information to your designs

  3. 3

    Redlines

    by Danny Keane

    141K users3.8KFree
  4. 4

    Inspect Styles

    by max.denaro

    136K users3.9KFree

    Inspect styles from Figma and transform to CSS

  5. 5

    Specs Classic

    by Directed Edges Plugins

    136K users5.5KFree + $8/mo upgrade

    Generate component specs including anatomy, props and layout & spacing

  6. 132K users3KFree

    📐 Effortlessly hand off your Figma designs to the development team

FAQ

Component Inspector FAQ

What does Component Inspector do?

Component properties as they would look in code. It's a Figma plugin by jake that runs in Figma Design and Dev Mode.

Is Component Inspector free?

Yes. Component Inspector is free to install and run from the Figma Community, with no paid tier listed.

Is Component Inspector safe to use?

Figma plugins can only reach the internet through domains listed in their manifest. Component Inspector declares no network access, so it runs entirely inside Figma and can't send your file anywhere. As with any plugin, check the developer's privacy policy before using it on client work.

How do I install Component Inspector?

Open it on the Figma Community, or search for it in the Actions menu (Cmd/Ctrl + K) inside any file you can edit. See how to install Figma plugins.

What are the best alternatives to Component Inspector?

By user count, the closest alternatives are Zeplin, Measure and Redlines. Compare all of them on the best Figma plugins for dev handoff.

For developers

Built this plugin?

Use this page as a landing page for Component Inspector: link to it from your site, README or launch posts, or add a badge. Pick a style and copy the code.

Component Inspector on figmaplugins.co

Style

Label

Size

Code

<a href="https://figmaplugins.co/plugins/component-inspector/" target="_blank" rel="noopener"><img src="https://figmaplugins.co/badges/featured-dark.svg" alt="Component Inspector on figmaplugins.co" width="220" height="48"></a>