Sketch Assistant Rules Explained 📐
Here's all of our awesome Sketch assistant rules explained. For normal humans.
Although our assistant was built for Sketch2React, it also works great with Marcode. Don't miss out on this gem.

Essential Watson
Behind the scenes this artboard actually becomes your very first page in code, aka index.html 🤖💪

Actually, Marcode also accepts the more fitting name App
We call this the code page. You can have several pages in your Sketch file but only the things that are on this super important page comes out to code in Sketch2React. ✅

In this example we added a margin top of 16px to this text block
Square brackets [ ] are used for adding CSS rules to specific parts of your design. Read more about them here.

Curly brackets { } are used within the Sketch2React framework to define component name i.e. {container}. Incorrect number of square brackets will cause parsing errors.

Here we have created a {text} component and saved it as a symbol aka reusable component
Curly brackets { } are used within the Sketch2React framework to define component name i.e. {text}. One neat trick is that if you convert your Sketch2React components to symbols, you don't need to follow our naming convention for the parent, in above case we have called the symbol H1.

Here we use the CSS class for using view height 100% for a nice flex layout of the whole container
Square brackets are used within the Sketch2React framework to define css-classes i.e. [css-class-name1 css-class-name2].

{externalasset.css} is used within the Sketch2React framework to target external CSS assets (fonts, local CSS-files, animation libraries etc.) that should be included in the generated output. Make sure to copy them to all your pages where you have external dependencies.
Last modified 1yr ago