πŸ“¦ airbnb / react-sketchapp

render React components to Sketch βš›οΈπŸ’Ž

β˜… 14.9k stars β‘‚ 810 forks πŸ‘ 14.9k watching βš–οΈ MIT License
reactreact-rendererreact-sketchappsketchsketch-plugin
πŸ“₯ Clone https://github.com/airbnb/react-sketchapp.git
HTTPS git clone https://github.com/airbnb/react-sketchapp.git
SSH git clone git@github.com:airbnb/react-sketchapp.git
CLI gh repo clone airbnb/react-sketchapp
Mathieu Dutour Mathieu Dutour Merge pull request #525 from macintoshhelper/patch-1 b238e69 4 years ago πŸ“ History
πŸ“‚ master View all commits β†’
πŸ“ __tests__
πŸ“ .github
πŸ“ docs
πŸ“ examples
πŸ“ src
πŸ“ template
πŸ“„ .bookignore
πŸ“„ .editorconfig
πŸ“„ .gitignore
πŸ“„ .npmignore
πŸ“„ .travis.yml
πŸ“„ book.json
πŸ“„ CHANGELOG.md
πŸ“„ jest.config.js
πŸ“„ LICENSE
πŸ“„ package.json
πŸ“„ README.md
πŸ“„ SUMMARY.md
πŸ“„ tsconfig.json
πŸ“„ README.md
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