Skip to content

airbnb/react-sketchapp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

b238e69 ยท Mar 30, 2021
Mar 25, 2020
May 7, 2020
Apr 21, 2020
Mar 26, 2021
Jun 8, 2020
Nov 14, 2019
Nov 13, 2019
Sep 18, 2017
Apr 3, 2019
Jan 20, 2020
Nov 14, 2019
Jun 8, 2020
Mar 23, 2018
Feb 19, 2020
Dec 11, 2016
Mar 22, 2017
Jan 20, 2020
Jun 8, 2020
Sep 18, 2018
Apr 22, 2020
Apr 22, 2020

Repository files navigation

react-sketchapp
render React components to Sketch; tailor-made for design systems

Quick-start ๐Ÿƒโ€

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 render

Next, check out some more examples!

readme-intro

npm Sketch.app Travis

Why?!

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.

What does the code look like?

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());
};

What can I do with it?

  • Manage design systemsโ€” react-sketchapp was built for Airbnbโ€™s design system; this is the easiest way to manage Sketch assets in a large design system
  • Use real components for designsโ€” Implement your designs in code as React components and render them into Sketch
  • Design with real dataโ€” Designing with data is important but challenging; react-sketchapp makes it simple to fetch and incorporate real data into your Sketch files
  • Build new tools on top of Sketchโ€” the easiest way to use Sketch as a canvas for custom design tooling

Found a novel use? We'd love to hear about it!

Read more about why we built it

Documentation