slint/tools/figma-inspector
dependabot[bot] de4f1d28c7
build(deps): bump the react group with 4 updates (#9627)
Bumps the react group with 4 updates: [react](https://github.com/facebook/react/tree/HEAD/packages/react), [@types/react](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react), [react-dom](https://github.com/facebook/react/tree/HEAD/packages/react-dom) and [@types/react-dom](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react-dom).


Updates `react` from 19.1.1 to 19.2.0
- [Release notes](https://github.com/facebook/react/releases)
- [Changelog](https://github.com/facebook/react/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/react/commits/v19.2.0/packages/react)

Updates `@types/react` from 19.1.15 to 19.2.0
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react)

Updates `react-dom` from 19.1.1 to 19.2.0
- [Release notes](https://github.com/facebook/react/releases)
- [Changelog](https://github.com/facebook/react/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/react/commits/v19.2.0/packages/react-dom)

Updates `@types/react-dom` from 19.1.9 to 19.2.0
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react-dom)

Updates `@types/react` from 19.1.15 to 19.2.0
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react)

Updates `@types/react-dom` from 19.1.9 to 19.2.0
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react-dom)

---
updated-dependencies:
- dependency-name: react
  dependency-version: 19.2.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: react
- dependency-name: "@types/react"
  dependency-version: 19.2.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: react
- dependency-name: react-dom
  dependency-version: 19.2.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: react
- dependency-name: "@types/react-dom"
  dependency-version: 19.2.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: react
- dependency-name: "@types/react"
  dependency-version: 19.2.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: react
- dependency-name: "@types/react-dom"
  dependency-version: 19.2.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: react
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-06 20:24:45 +03:00
..
backend Update to Biome 2.0 (#8730) 2025-06-19 21:38:30 +03:00
public-zip Make the Figma plugin available via the nightly snapshot tag page (#7655) 2025-02-18 11:40:33 +02:00
shared Use Rnd to resize the Figma window (#8576) 2025-06-02 16:27:13 +03:00
src Allow easier sharing of common web files (#8869) 2025-07-08 16:44:06 +03:00
tests Update property-parsing.test.ts 2025-06-19 21:56:26 +02:00
.gitignore Fix tailwind config issues due to .gitignore (#8324) 2025-05-01 02:24:42 +03:00
biome.json Update to Biome 2.0 (#8730) 2025-06-19 21:38:30 +03:00
figma.config.ts (figma) dev-mode snippet can now toggle using variables (#8372) 2025-05-05 18:18:01 +03:00
index.html Figma plugin update for non dev mode (#7698) 2025-02-25 10:41:11 +02:00
package.json build(deps): bump the react group with 4 updates (#9627) 2025-10-06 20:24:45 +03:00
PUBLISH.md Publish Figma Plugin to store (#7735) 2025-02-25 15:11:19 +02:00
README.md Make figma project stricter (#8461) 2025-05-19 17:21:05 +03:00
tsconfig.json Make figma project stricter (#8461) 2025-05-19 17:21:05 +03:00
vite.config.code.ts Convert Figma project to Vite + React (#7453) 2025-01-27 12:54:09 +02:00
vite.config.ts figma: remove tailwind (#8355) 2025-05-05 14:23:22 +03:00

Figma to Slint property inspector

Installing the plugin from Figma

The latest release of the Figma Inspector can be installed directly from the Figma website at

https://www.figma.com/community/plugin/1474418299182276871/figma-to-slint

or in Figma by searching for the "Figma To Slint" plugin.

Installing the plugin via nightly snapshot.

Download the nightly snapshot figma-plugin.zip.

The prerequisites are either the Figma Desktop App or the Figma VSCode extension. A valid Figma subscription with at least 'Team Professional' is needed.

In Figma Desktop or the VScode extension have a file open and right click on it. Select Plugins > Development > Import Plugin From Manifest.. and point it at the manifest.json file that you just unzipped.

The Slint properties will now show in the Dev mode inspector in the same place the standard CSS properties would have been shown.

Build

Figma is a web app (Chromium) and the plugin is just javascript. As with other web apps in the repo the prerequisite software needed to develop the plugin are:

You need to install the following components:

You also MUST have a valid Figma developer subscription as the plugin works in the Dev mode and/or Figma VS Code extension.

To try it out locally type this in this directory:

## only need to run this once
pnpm install

pnpm build

Then in Figma on an open file right click and select Plugins > Development > Import Plugin From Manifest.. and point it at the dist/manifest.json file that has now been created inside this project.

You should also ensure Plugins > Development > Hot Reload Plugin is ticked.

To develop in hot reload mode:

pnpm dev

As you save code changes the plugin is automatically recompiled and reloaded in Figma for Desktop and/or the Figma VS Code extension.

Testing

As of writing Figma has real test support. Testing is limited to unit testing some of the functions via Vitest.

You can find the test files under /tests. This folder also includes the JSON export of a real Figma file to test against. The easiest way to update the file is to to edit it in Figma and then use a personal access token to get a JSON version.

To get an access Token in Figma go to the home screen. Then top right click the logged in user name. Then Settings and then the Security tab. Scroll to the bottom and choose Generate new token. Then save the token in a secure private place.

You then need to get the file ID. Open figma.com, login and open the file. You will then have a url like https://www.figma.com/design/njC6jSUbrYpqLRJ2dyV6NT/energy-test-file?node-id=113-2294&p=f&t=5IDwrGIFUnri3Z17-0. The ID is the part of the URL after /design/ so in this example njC6jSUbrYpqLRJ2dyV6NT.

You can then use curl to download the JSON with

curl -H 'X-Figma-Token: <YOUR_ACCESS_TOKEN>' \
'https://api.figma.com/v1/files/<FIGMA_FILE_ID>' \
-o figma_output.json

Vitest can then be run in hot reload mode for ease of test development with:

pnpm test