Security News
Python Overtakes JavaScript as Top Programming Language on GitHub
Python becomes GitHub's top language in 2024, driven by AI and data science projects, while AI-powered security tools are gaining adoption.
react-figma
Advanced tools
This plugin template uses Typescript. If you are familiar with Javascript, Typescript will look very familiar. In fact, valid Javascript code is already valid Typescript code.
Render React components to Figma.
Example of code:
import * as React from 'react';
import { Page, Rectangle, Text } from 'react-figma';
export const App = () => {
return (
<Page name="New page">
<Rectangle style={{ width: 200, height: 100, backgroundColor: '#dd55aa' }} />
<Text characters="text" style={{ color: '#ffffff' }} />
</Page>
);
};
⚠️ Warning!️ Project is not production ready and currently at alpha version. API can be changed.
Install it with yarn:
yarn add react-figma yoga-layout
Or with npm:
npm i react-figma yoga-layout --save
import * as React from 'react';
import { renderer, subscribeOnMessages } from 'react-figma';
import { App } from './App';
figma.showUI(__html__, { visible: false });
figma.ui.onmessage = message => {
subscribeOnMessages(message);
};
(async () => {
await renderer(<App />);
figma.closePlugin();
})();
import * as yoga from 'yoga-layout';
import { uiWorker } from 'react-figma';
onmessage = event => {
uiWorker({ yoga })(event);
};
import * as React from 'react';
import { Page, Rectangle, Text } from 'react-figma';
export const App = () => {
return (
<Page name="New page">
<Rectangle style={{ width: 200, height: 100, backgroundColor: '#dd55aa' }} />
<Text characters="text" style={{ color: '#ffffff' }} />
</Page>
);
};
FAQs
Render React components to Figma
The npm package react-figma receives a total of 1,088 weekly downloads. As such, react-figma popularity was classified as popular.
We found that react-figma demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Python becomes GitHub's top language in 2024, driven by AI and data science projects, while AI-powered security tools are gaining adoption.
Security News
Dutch National Police and FBI dismantle Redline and Meta infostealer malware-as-a-service operations in Operation Magnus, seizing servers and source code.
Research
Security News
Socket is tracking a new trend where malicious actors are now exploiting the popularity of LLM research to spread malware through seemingly useful open source packages.