render React components to Sketch ⚛️💎
First, make sure you have installed Sketch version 50+, & a recent npm.
Open a new Sketch file, then in a terminal:
git clone https://github.com/airbnb/react-sketchapp.git
cd react-sketchapp/examples/basic-setup && npm install
npm run renderNext, check out some more examples!
Managing the assets of design systems in Sketch is complex, error-prone and time consuming. Sketch is scriptable, but the API often changes. React provides the perfect wrapper to build reusable documents in a way already familiar to JavaScript developers.
import * as React from 'react';
import { render, Text, Artboard } from 'react-sketchapp';
const App = props => (
<Artboard>
<Text style={{ fontFamily: 'Comic Sans MS', color: 'hotPink' }}>{props.message}</Text>
</Artboard>
);
export default context => {
render(<App message="Hello world!" />, context.document.currentPage());
};react-sketchapp was built for Airbnb’s design system; this is the easiest way to manage Sketch assets in a large design systemreact-sketchapp makes it simple to fetch and incorporate real data into your Sketch filesFound a novel use? We'd love to hear about it!
Read more about why we built it
Add TestRenderer.act callback function
Non-uniform border mask path overlaps borderRadius
SVG rendering broken in Sketch 85.1
Unable to use [email protected] with typescript
Better Image API Parity with React Native
Render crashes Sketch with @skpm/builder @0.7.0 - @0.7.5
Svg did not rendered as expected
form-validation example
renderToJson broken in 3.2.5
Support fixed position for prototypes