react-sketchapp | render React components to Sketch ⚛️💎 | Frontend Framework library
kandi X-RAY | react-sketchapp Summary
kandi X-RAY | react-sketchapp Summary
render React components to Sketch; tailor-made for design systems.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of react-sketchapp
react-sketchapp Key Features
react-sketchapp Examples and Code Snippets
Community Discussions
Trending Discussions on react-sketchapp
QUESTION
We are trying to develop a workflow, utilizing React react-sketchapp Sketch, that a designer in Sketch can produce React components and the coding (at least for the CSS) is automatically generated and configurable. There doesn't seem to be a lot of documentation and/or support.
We understand the basics of developing a component in React to Sketch, but has anyone figured out a workflow for the reverse? Any additional thoughts or documentation that could help?
We are thinking of dropping react-sketchapp and going to a more effective workflow
...ANSWER
Answered 2020-Mar-18 at 01:29I've been working with this concept (Sketch to React translation) and haven't found an effective/configurable solution and I don't think there will be any time soon, or at least one that put to use the best parts of Sketch with the best parts of React.
Sketch has an amazing symbol system that allows for design tokens (such as a global color palette or typography styles) to be re-used or instanced from a central location – a source of truth.
Unfortunate circumstance 1:
These symbols sets do not translate over into variable sets (CSS or SCSS, etc.) when exported into a React component – all the values are hard coded and no variables are present. You may be able to create a very custom implementation to do this, but it will most certainly break the second you reconfigure your build process or tech stack choices.
Unfortunate circumstance 2:
Sketch symbols or UI elements don't manage their own state, you simple swap them out with a different symbol/element. There's far too much involved to translate multiple sketch elements into the logic of a React component that manages it's own state. Especially when you take into account the complexity of modern build streams and technology stacks.
How my team has worked around this:
Shared building blocks and standards that bridge the gap between design and development can REALLY help. (An example is a set of CSS color variables that maps to a set of Sketch color symbols). Atomic level pieces of a system can be translated between Sketch and CSS with relative ease – then all you have to do is put the puzzle pieces together. Put this together with a good layer of communication between designers and developers, and your team is far ahead of the margins.
QUESTION
I've was testing the react-sketchapp which looks pretty neat so far.
Besides rendering the default sketch elements like Text
,View
,Image
and so on, would it be possible to render a default react component containing HTML-Markup styled with scss?
I tried rendering the following Hello
-Component:
ANSWER
Answered 2017-Apr-27 at 17:51You can't render HTML elements to Sketch, same as you can't render HTML elements to React Native.
React is just a way of managing a tree of abstract components. How to render these components needs to be defined by the specific renderer you are using. react-sketchapp
is a renderer that understands components which render to Sketch elements, but it does not understand HTML elements such as div
. (and React Native includes a renderer which knows how to render React Native components to native mobile views, react-music is a renderer which knows how to render React Music components into audio, and so forth).
React, in and of itself, has nothing to do with HTML elements or the DOM. The react-dom
renderer library is where the magic of rendering into the DOM happens. If you want to render HTML elements to Sketch, you'll need to write a React renderer which knows how to convert HTML elements to Sketch's file format.
QUESTION
We're trying to create a common UI component library for both our designers and developers with React. In other words - we want to render our component library to both react-dom
and react-sketchapp
.
We would love to specify the structure once, the styles once and the behavior once.
We can get there (kind of at least) with projects like react-primitives
or styled-components/primitives
, but this approach basically stops us from having any semantics in our HTML. When all you have to work with is Text
, you can't really specify whether that text is a
or an
How have people dealt with sharing code this way previously? How can we basically render HTML (via JSX) to Sketch?
...ANSWER
Answered 2017-Sep-25 at 18:55You can create your own primitives by creating multiple files targeting different platforms.
For example, if you would like to create a primitive for h1
, you would create a file called h1.web.js
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install react-sketchapp
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page