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

# Sketch Assistant Rules Explained 📐

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

{% hint style="success" %}
Download our [Sketch assistant](https://www.sketch.com/extensions/assistants/@sketch2react/sketch2react-assistant/)
{% endhint %}

## Document must contain one artboard named “Start” on a page named “Start here”

![Essential Watson](https://1404888505-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LL-qYWTohHkbVxTapce%2F-MIskF2JuQQ3iedit5sf%2F-MIslTSvghg6A-9CTEL3%2FSka%CC%88rmavbild%202020-10-05%20kl.%2014.22.08.png?alt=media\&token=ace56146-f583-4fd1-877d-9c86e488598b)

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

## Document must contain one page named “Start here”

![Actually, Marcode also accepts the more fitting name App](https://1404888505-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LL-qYWTohHkbVxTapce%2F-MIslWWLz1mhHtMHNS1p%2F-MIslaJUS8XVTw63jrSu%2FSka%CC%88rmavbild%202020-10-05%20kl.%2014.35.05.png?alt=media\&token=2d727459-da0f-427b-9f94-b03d9cb62882)

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

![In this example we added a margin top of 16px to this text block ](https://1404888505-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LL-qYWTohHkbVxTapce%2F-MIt-ItfZgDj2_zYC5EY%2F-MIt050TPNLOsRUGpHLX%2FSka%CC%88rmavbild%202020-10-05%20kl.%2015.45.27.png?alt=media\&token=5146a081-9d3b-4d3a-a1d7-12be1aeb3ec5)

**Square brackets** **\[ ]** are used for adding CSS rules to specific parts of your design. Read more about them [here](https://app.gitbook.com/@sketch2react/s/sketch2react-io/learn/cheat-sheet#classes).

## Group name must contain one pair of curly brackets

![](https://1404888505-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LL-qYWTohHkbVxTapce%2F-MIxyb0ntsATfC11maqj%2F-MIxzfL1U7JgHrslJcAe%2FSka%CC%88rmavbild%202020-10-06%20kl.%2014.57.23.png?alt=media\&token=bdca4518-48d4-4e93-8e2f-b47a1f512c8c)

**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

![Here we have created a {text} component and saved it as a symbol aka reusable component](https://1404888505-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LL-qYWTohHkbVxTapce%2F-MIy-OWyjPhA8H3H9RWN%2F-MIy-nAO06ttYfsizrnF%2FSka%CC%88rmavbild%202020-10-06%20kl.%2015.02.51.png?alt=media\&token=dd332d5d-4843-426d-82cc-6c03b9de43de)

**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

![Here we use the CSS class for using view height 100% for a nice flex layout of the whole container](https://1404888505-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LL-qYWTohHkbVxTapce%2F-MIy0nPm-6bguyXKlTGD%2F-MIy1Qkc4ZYXablZH24q%2FSka%CC%88rmavbild%202020-10-06%20kl.%2015.10.32.png?alt=media\&token=f887a20b-5e55-4c18-82c0-d6092202ac40)

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}

![](https://1404888505-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LL-qYWTohHkbVxTapce%2F-MIy1hW7rosvc2A-IrwZ%2F-MIy2loaip_EnqumSGK-%2FSka%CC%88rmavbild%202020-10-06%20kl.%2015.16.07.png?alt=media\&token=eb621d45-dfc1-4f30-90bc-4c75a4ddc34b)

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