Description
A React renderer into Figma. Use React components as a source for your designs.
🍬 Compatible with react-native, react-sketchapp, react-primitives API.
🦄 Flexible layouts support with Yoga Layout.
♻️ Hydration and HMR support.
⚙️ Built on Figma Plugin API.
React Figma alternatives and similar libraries
Based on the "PostCSS" category.
Alternatively, view React Figma alternatives based on common mentions on social networks and blogs.
-
CSS Layout
A collection of popular layouts and patterns made with CSS. Now it has 80+ patterns and continues growing! -
vue-virtual-scroll-list
⚡️A vue component support big amount data list with high scroll performance. -
Atomizer
A tool for creating Atomic CSS, a collection of single purpose styling units for maximum reuse -
React Inline
Transform inline styles defined in JavaScript modules into static CSS code and class names so they become available to, e.g. the `className` prop of React elements. -
jTools - Javascript web components
jTools is a collection of lightweight common required javascript web components. It is composed of fully responsive javascript vanilla plugins to help you bring the best user experience to your projects, independent of the platform. -
DHTMLX UI Widgets with React
Using DHTMLX widgets with React -
DHTMLX Widgets with Angular
Using DHTMLX UI widgets with Angular -
DHTMLX Widgets with Vue
Using DHTMLX widgets with Vue -
ms-business-startup-bulma
Basic demo using Bulma CSS Framework Demo:
Get performance insights in less than 4 minutes
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest. Visit our partner's website for more details.
Do you think we are missing an alternative of React Figma or a related project?
README
React Figma
A React renderer for Figma. Use React components as a source for your designs.
- 🍬 Compatible with react-native, react-sketchapp, react-primitives API.
- 🦄 Flexible layouts support with Yoga Layout.
- ♻️ Hydration and HMR support.
- ⚙️ Built on Figma Plugin API.
- 🚫 Is not a code generator.
Example of code:
import * as React from 'react';
import { Page, View, Text } from 'react-figma';
export const App = () => {
return (
<Page name="New page" isCurrent>
<View>
<View style={{ width: 200, height: 100, backgroundColor: '#dd55aa' }} />
<Text style={{ color: '#ffffff' }}>text</Text>
</View>
</Page>
);
};
⚠️ Warning!️ Project is not production ready and currently at beta version. API can be changed.
Installation
Using boilerplate
You can use react-figma-boilerplate for creating own projects.
From scratch
Install it with yarn:
yarn add react react-figma
Or with npm:
npm i react react-figma --save
Usage
Configure main thread
import { setupMainThread } from 'react-figma/rpc';
figma.showUI(__html__, { visible: false });
setupMainThread();
Configure ui thread
import * as React from 'react';
import { App } from './App';
import 'react-figma/rpc';
import { render } from 'react-figma';
render(<App />);
Import components
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>
);
};
Docs
Examples
- [Basic](examples/basic)
- [Basic + HMR](examples/basic-hmr)
- [Design system](examples/design-system)
- [Interactive](examples/interactive)
- [Data fetching](examples/fetching)
- [💅 styled-components](examples/styled-components)
- PrimerDemo - Example of multifplatform UI-kit
- [Component Variants](examples/component-variants)
- [MDX](examples/mdx)
Become a Contributor 🎖
Whether you're helping us implement features, fix bugs or improve the docs, we'd love to have you as part of the community!
How to Contribute
Check out our [Contributing Guide](./contributing.md) for ideas on contributing and setup steps for getting repository up and running on your local machine.
Acknowledgements
React Figma team wishes to thank the following invaluable contributions:
- Lera Lesik, for creating project logo.
- Maksim, for TypeScript counseling.
Tested with browserstack
Contributors ✨
Thanks goes to these wonderful people (emoji key):
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --> <!-- prettier-ignore-start --> <!-- markdownlint-disable --> Ilya Lesik💻 Losev Yaroslav💻 Vishnu Singh💻 corrina💻 Zachary Witt💻 Abdelrahman Ashraf💻 sprashad📖 Vivian Lee💻 macintoshhelper💻 Pierre Grimaud📖 Greg Westneat💻 Marius Reimer💻
<!-- markdownlint-enable --> <!-- prettier-ignore-end --> <!-- ALL-CONTRIBUTORS-LIST:END -->
This project follows the all-contributors specification. Contributions of any kind welcome!