Marcode
πŸ“—Stay on top, read our blog πŸ˜„πŸ’ͺ
  • Welcome to Marcode Docs 🏑
  • learn
    • Get started guide πŸ•
    • Markup cheat sheet πŸ““
    • Using Marcode with Icons8 Lunacy
    • Components πŸ’Ž
    • Exporting to Code 🚚
    • Sketch Assistant Rules Explained πŸ“
  • goodies
    • CSS Writer plugin πŸ”Œ
    • Code snippets πŸ‘©β€πŸ’»
    • 3rd Party Plugins & Apps βš™οΈ
    • Join our Slack πŸ‘―β€β™‚οΈ
  • Support
    • FAQ❓
    • Releases ✍️
Powered by GitBook
On this page
  • Document must contain one artboard named β€œStart” on a page named β€œStart here”
  • Document must contain one page named β€œStart here”
  • Group name may contain zero or one pair of square brackets
  • Group name must contain one pair of curly brackets
  • Text name must contain one pair of curly brackets
  • Text name may contain zero or one pair of square brackets
  • Artboards must contain at least one text layer named {externalasset.css}
  1. learn

Sketch Assistant Rules Explained πŸ“

Here's all of our awesome Sketch assistant rules explained. For normal humans.

PreviousExporting to Code 🚚NextCSS Writer plugin πŸ”Œ

Last updated 2 years ago

Although our assistant was built for Sketch2React, it also works great with Marcode. Don't miss out on this gem.

Download our

Document must contain one artboard named β€œStart” on a page named β€œStart here”

Behind the scenes this artboard actually becomes your very first page in code, aka index.html πŸ€–πŸ’ͺ

Document must contain one page named β€œStart here”

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. βœ…

Group name may contain zero or one pair of square brackets

Group name must contain one pair of curly brackets

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

Text name must contain one pair of curly brackets

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.

Text name may contain zero or one pair of square brackets

Square brackets are used within the Sketch2React framework to define css-classes i.e. [css-class-name1 css-class-name2].

Artboards must contain at least one text layer named {externalasset.css}

{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.

Square brackets [ ] are used for adding CSS rules to specific parts of your design. Read more about them .

here
Sketch assistant
Essential Watson
Actually, Marcode also accepts the more fitting name App
In this example we added a margin top of 16px to this text block
Here we have created a {text} component and saved it as a symbol aka reusable component
Here we use the CSS class for using view height 100% for a nice flex layout of the whole container
Page cover image