랭킹으로 돌아가기

html-sketchapp/html-sketchapp

JavaScript

HTML to Sketch export solution

sketchhtmldesign-systemshtml-sketchappsketch-plugin
스타 성장
스타
1.9k
포크
116
주간 성장
이슈
41
5001k1.5k
2017년 8월2020년 7월2023년 7월2026년 7월
아티팩트npmnpm install html-sketchapp
README

html-sketchapp Build Status npm version MIT license npm downloads

HTML to Sketch export solution.

html-sketchapp

What it can do?

html-sketchapp turns HTML nodes into Sketch layers or symbols. Additionally, it allows to export shared text styles and document colors.

Why?

The motivation behind this project was ability to easily share Front-End style guide with our Design team. Although similar project, react-sketchapp, already exists it does require you to:

  • use React,
  • build everything using generic components (<View>, <Text>, <Image>),
  • and keep your styles in JS.

We were unable to quickly work around these limitations, so we created html-sketchapp.

You can learn more about this project from:

Limitations

Comprehensive summary of what is, and what is not supported can be found here, but the TLDR is as follows:

  • pseudoelements are not supported,
  • some CSS properties (e.g. overflow) are not supported or not fully supported,
  • not all types of images are supported (animated gifs, webp),
  • resizing information is not generated,
  • all fonts have to be locally installed.

The good news is that all of those are fixable and that we welcome pull requests ❤️

How do I run it?

Install html-sketchapp

You can get stable version of html-sketchapp from NPM.

npm i @brainly/html-sketchapp

Create .asketch files

html2asketch is a library that you can use to create a script that extracts specific parts of your website and saves them as layers, shared text styles, document colors and symbols. Your script then can be run in a regular or a headless browser.

There is no one right way of using html2asketch, but you can start by checking out the "Usage Examples" section of the wiki or the two example projects that we provide:

  • html-sketchapp-example - minimal script that takes an URL and produces a page.asketch.json file
  • html-sketchapp-style-guide - script that takes parts of the Brainly style-guide and exports them as Sketch symbols, shared text styles and document colors. This script produces document.asketch.json and page.asketch.json.

If you are wondering what are, and why we need .asketch files, plese see our wiki.

Import .asketch files to Sketch

All .asketch.json files should be loaded to Sketch via the asketch2sketch.sketchplugin plugin.

Installing Sketch plugin

You can download ready to use Sketch plugin from the "Releases" section, or build it yourself from the sources:

npm i # install dependencies
npm run build # build the plugin

Projects using html-sketchapp

  • html-sketchapp-cli - "Quickly generate Sketch libraries from HTML documents and living style guides."
  • story2sketch - "Convert Storybook stories into Sketch symbols."
  • UIengine - "Workbench for UI-driven development."
  • Alva - "Alva is a radically new design tool that enables cross-functional teams to design digital products"
  • FAST-DNA - "A set of tooling, resources, and components used to accelerate building Web sites and applications."
  • HTML to Sketch - "You can draw a website in an open sketch window."

Standing on the shoulders of giants :heart:

This project uses huge bits and pieces from the fantastic react-sketchapp and wouldn't be possible without skpm and information from Sketch-Headers.

관련 저장소
tldraw/tldraw

Build infinite canvas apps in React with the tldraw SDK. World's best, top-most agent recommended #1 five star SDK.

TypeScriptnpmOtherdrawingsketch
tldraw.dev
49.1k3.4k
gztchan/awesome-design

🌟 Curated design resources from all over the world.

designui
17.3k1.2k
airbnb/react-sketchapp

render React components to Sketch ⚛️💎

TypeScriptnpmMIT Licensereact-sketchappreact
airbnb.io/react-sketchapp/
14.9k799
casesandberg/react-color

:art: Color Pickers from Sketch, Photoshop, Chrome, Github, Twitter & more

JavaScriptnpmMIT Licensereactreact-component
casesandberg.github.io/react-color/
12.3k922
mjswensen/themer

🎨 themer takes a set of colors and outputs themes for your apps (editors, terminals, wallpapers, and more).

TypeScriptnpmMIT Licensewallpapersthemer
themer.dev
5.8k136
sketchplugins/plugin-directory

Official Sketch Plugin directory

RubyRubyGemssketchsketch-plugin
sketch.com/extensions/plugins
3.4k682
weui/weui-design

Design package for WeUI

weuipsd
2.9k415
LHRUN/paint-board

🎨 A powerful multi-end drawing board that brings together a lot of creative brushes to experience a whole new range of drawing effects!

TypeScriptnpmMIT Licensecanvascanvas-game
songlh.top/paint-board/
2.6k292
weixin/Miaow

A set of plugins for Sketch include drawing links & marks, UI Kit & Color sync, font & text replacing.

JavaScriptnpmOtherwechatsketch
2.5k145
itmeo/webgradients

180 linear gradients in CSS3, Figma, Sketch and PSD formats — free for personal and commercial use

CSSnpmMIT Licensegradientbackground
webgradients.com
2.5k141
mathieudutour/git-sketch-plugin

:gem::octocat: A Git client generating pretty diffs built right into Sketch.

JavaScriptnpmMIT Licensesketch-pluginsketch
mathieudutour.github.io/git-sketch-plugin
2.4k121
matt-curtis/Fluid-for-Sketch

[Sketch Plugin] Sketch-flavored Auto Layout-like Constraints

Objective-Csketch-pluginconstraints
2.4k65