# Overview

Meet with Monday Hero, documentation and learn how to convert design to code.

## What is Monday Hero?

Monday Hero converts designs into iOS and Android code for developers and designers. It doesn't mean that you won't code, it means that Monday Hero will understand and generate layout code, assets, fonts, colors.. for you. With Monday Hero, you don't need to code the UI design details again that are already well-prepared by a designer. You can **save time by removing repetitive manual work in the UI** and **focus on the functionality/creativity more**.

Monday Hero supports Sketch App and Adobe XD designs now, you can export design via a plugin. Figma will be supported soon.

In Monday Hero, you also improve the team's handoff process between designers and developers.&#x20;

### What are the key benefits?

#### Speed up your workflow ⚡️

Save time in the UI part that already well-prepared by a designer up to 30 percent in total project time.&#x20;

#### Bring your designs into life **🎨**

It's so easy to have the correct color, font, and pixel for every item. It's so easy to bring your designs to life now.

#### **Meet the demands on time ⏳**

Have more time to focus on functionality, coding, and testing.

**Get ready-to-run UI and project files 💻**

Export the user-interface design as a fully-working code with assets.

**Remove conflicts and misunderstandings 🗣**

Improve designer-developer collaboration.

### What are the most important features of the design to code with Monday Hero?

Our functions that developers & teams love:

* Converting layers to native Android / iOS components,
* **Exporting the source-code, assets, fonts, colors, and UI** for iOS/Android via plugins and working independently,
* UI/Layout (**Storyboard/XML) support**,
* Responsive UI/Layout to **support all screen sizes**,
* Customization of the code output with **Code Preferences**,
* Exporting the design as a new project / into an existing project / only selected screens,
* Working in an **all-in-one place** with the team,
* Dark/Light theme is available,\
  … and many more.

### Documentation

In the docs, you will find 3 sections. In the first section, you will find the introduction and the tips that will **prepare you to have the smoothest way to use Monday Hero** which includes:

1. &#x20;[Workflow basics](/v1-mac-app/workflow-for-design-to-code)
2. &#x20;[Installation](/v1-mac-app/getting-started/install-app-and-plugin)
3. &#x20;[Login & Create Your First Project](/v1-mac-app/getting-started/login-create-project-in-monday-hero)
4. [ Roles & Manage Your Team](/v1-mac-app/getting-started/manage-team-developer-designer-role)
5. [ Prepare Design To Get Best Results](/v1-mac-app/getting-started/design-handoff-to-ios-android-developer)
6. [ Export Your Design File To Monday Hero](/v1-mac-app/getting-started/import-sketch-adobe-xd-design-into-monday-hero)

topics. In the second section, you will **work with Monday Hero**. This section covers:

1. [Automatically Generated Components](/v1-mac-app/working-with-monday-hero/auto-component-code-generation)
2. [Convert To Components](/v1-mac-app/working-with-monday-hero/component-convert-to-ios-android-code)
3. [Configure Code Preferences](/v1-mac-app/working-with-monday-hero/code-preferences-ios-android)
4. [Export Code](/v1-mac-app/working-with-monday-hero/export-design-to-swift-android-code-monday-hero)

In the last section, you will find tutorials that are handy to discover Monday Hero really fast.&#x20;

### How to Use Monday Hero Briefly

You can see how to use Monday Hero in the 2-minutes-video below.

{% embed url="<https://www.youtube.com/watch?v=zXq_ilr4mmw>" %}

When you watch the video, you'll see that Monday Hero automatically understands the images, texts, and views in the design. Therefore, **it expects you to define which layers will be converted to components/widgets** like buttons, text boxes, lists, or grids that you may need in almost every app. You can generate the component's code dynamically.&#x20;

After converting components, you can customize your code to maintain your/team's code standards(optional). Customizable code allows you to export the code as you prefer and helps you to **get the best fit for your already agreed/existing codebase**.&#x20;

At the last step, you can export the latest version of your project UI with one click as an Xcode project or Android Studio project, and it is ready for developmen&#x74;**.** You can start with the [Workflow Basics](/v1-mac-app/workflow-for-design-to-code) to see the way we recommended for getting the smoothest experience.


# Workflow Basics

Workflow basics that most developers and designers use while converting the Sketch / Adobe XD design to iOS / Android native code with Monday Hero.

## Design to Code Workflow for Developers and Designers

Most users & teams follow this workflow while they are working with Monday Hero. Note that this is not a mandatory workflow, but if you are searching for a smoother way to use Monday Hero, you are in the right place.\
\
This workflow includes 3 phases:

1. The first phase covers the **design**, and the user-interface needs to be prepared in either Sketch or Adobe XD.&#x20;
2. The second phase is about how you **develop** your project. In this phase, you can edit the generated code by defining the interactions (like buttons, text views, and lists...) of the layers/views. &#x20;
3. Then, you can export your project and pass on the last phase, the **Edit & Review**. In this phase, you will have your ready-to-run project UI. You can do your **edits** and continue to develop your project in your favorite IDE.&#x20;

It is always possible to have some changes in UI while working with designers/customers. When you got reviews and changes, it is possible to keep up with them easily by following the flow from [**Phase 1: Design**](/v1-mac-app/workflow-for-design-to-code#phase-1-design) till [**Phase 3: Edit & Review**](/v1-mac-app/workflow-for-design-to-code#phase-3-edit-and-review) again. You can generate and add changes to your existing project.&#x20;

![A designated workflow in Monday Hero.](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MHuRKzarvyHncQCVPDw%2F-MHucVwTTp2wEtGm2Bzx%2Fbetteralignment.png?alt=media\&token=73cdeba3-67cc-4fa3-bb32-f1c9b1390f52)

### Phase 1: Design&#x20;

As we mentioned above, the design file needs to be prepared in either Sketch or Adobe XD. After you finish your design, you should check whether your design file is ready to share with a developer. This is one of the key points to get the most accurate export from Monday Hero.

In the design phase, you have two steps to follow after you complete your design:

#### Step 1: Check The Design File&#x20;

In the design file, all icons, background images, and logos that will be used in the artboards must be exportable and grouped, so that they can be used easily. Also, mockup rectangles or designs should be removed from the design file.&#x20;

You can read more about [how to check the design file and avoid possible mistakes here.](/v1-mac-app/getting-started/design-handoff-to-ios-android-developer)

![A Common Mistake Example](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MGhr4acZv4N9uwxBmm1%2F-MGhvrw4RAeExa7iiH03%2FGroup%202.png?alt=media\&token=8275a3d6-9773-474f-a788-e1d3b21a404f)

#### Step 2: Import Designs into Monday Hero

After reviewing the design file and making the final touches, you are ready to export via plugins. Select the artboard/s that you want to work on, and export it/them by using [Monday Hero Plugin](/v1-mac-app/getting-started/import-sketch-adobe-xd-design-into-monday-hero) in your current design tool. \
\
Learn more about [how to import a design file into Monday Hero.](/v1-mac-app/getting-started/import-sketch-adobe-xd-design-into-monday-hero)

![Export Designs to Monday Hero](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MGhr4acZv4N9uwxBmm1%2F-MGhwY9LdCs4gPNnhhL6%2FExport.png?alt=media\&token=0312818d-7643-460e-91e8-516a052cbcce)

### Phase 2: Develop

#### Step 1: Converting Layers / Views Into Components&#x20;

When you import a design, Monday Hero automatically understands images, texts, and views in the design. In this step, **it expects you to define the interactions of the layers/views**. You can select the layers and define them as buttons, text inputs, lists, or any other components that you want to use, in that particular scenario.

You can create the components with a couple of clicks, and you will see the generated code immediately.

Learn more about [how to convert layers to components here.](/v1-mac-app/working-with-monday-hero/component-convert-to-ios-android-code)

![Converting Layers into Components](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MGhx_AmMMEqSoF_ptOj%2F-MGi4GxDYfhPoOmrYhMv%2FButon%20gif.gif?alt=media\&token=c316441d-498f-433d-963c-84fecefd922d)

#### Optional Step: Customize The Code Before Export

You can change the code preferences and maintain your/team's code standards. It allows you to export the code as you prefer and helps you to **get the best fit for your already agreed/existing codebase**.

Read about [how to configure your code preferences here.](/v1-mac-app/working-with-monday-hero/code-preferences-ios-android)

![Code Preferences](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MGhx_AmMMEqSoF_ptOj%2F-MGi2xSdCLmJrTTSKCak%2FCode%20preferances.png?alt=media\&token=0901c8a1-2d4b-4e14-898e-adaf2fc41d0e)

#### Step 2: Export Code as Swift/ Kotlin & XML Code

There are two ways to get ready-to-run code out of Monday Hero: exporting a single screen or whole project. You can export them as a new project, or you can export your changes into your existing project.

* **Exporting Screen:** If you want to export just a single screen, it will give you all the required code and assets to add it to your existing project. It helps you to handle last-minute changes. <br>
* **Exporting Project:** If you are working on a new app and didn't export before, this is the best to export the entire project. You will get a ready-to-run project code with all screens that you prepared.

Depends on the project that Read and learn more about[ how to export code here.](/v1-mac-app/working-with-monday-hero/export-design-to-swift-android-code-monday-hero)

![Exporting Code](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MHudJpYDgvnYV_AjQx6%2F-MHufvB1Dv_2ajCPsxly%2FnewProject.png?alt=media\&token=464e2093-e9ec-47d0-b17e-d0e6cc7a18e2)

### Phase 3: Edit & Review&#x20;

This phase takes place out of Monday Hero. You already exported your project UI source-code and assets as an Xcode project or Android Studio project, and it is ready for development. You can build your project, work on the backend services and configurations as you wish.

{% hint style="info" %}
When you have some changes in UI, it is possible to keep up with them easily by following the flow from [**Phase 1: Design**](/v1-mac-app/workflow-for-design-to-code#phase-1-design) till [**Phase 3: Edit & Review**](/v1-mac-app/workflow-for-design-to-code#phase-3-edit-and-review) again. You can generate and add changes to your existing project. Then, you can work in your development environment.
{% endhint %}

#### What's Next?

Let's get to work! You can [download](/v1-mac-app/getting-started/install-app-and-plugin) and[ create your first project on Monday Hero](/v1-mac-app/getting-started/login-create-project-in-monday-hero).


# Installation

Install Monday Hero and enjoy saving time, improve handoff quality, and meet deadlines.

## How to Install Monday Hero

Setting up Monday Hero takes just a few clicks. Here are the 2 steps to complete it:&#x20;

1 - Sign up and create an account via [our website](https://mondayhero.io/). You can manage your current plan, send invitations, and get invited to projects by using your account.

{% embed url="<https://mondayhero.io/signup>" %}

2 - Download the`.zip` file, unpack the ZIP. That's it. You can log in with your account and password.&#x20;

{% embed url="<https://mondayhero.io/download>" %}

{% hint style="info" %}
Monday Hero is compatible with macOS High Sierra (10.13.4) and Sketch 52/Adobe XD 13 or higher.
{% endhint %}

### Sketch / Adobe XD Plugins

{% hint style="info" %}
Sketch plugin will be automatically installed when you install Monday Hero.&#x20;
{% endhint %}

3-  Download and Install Adobe XD plugin (if needed).

If you can’t see the plugin in Sketch/Adobe XD, **Plugins > Monday Hero**, you can manually download it from [here](https://mondayhero.io/download) and double-click to install in seconds. &#x20;

![Just download and double-click to install Adobe XD Plugin.](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MIYTH04MK1AufQ0Fcdl%2F-MIYVKXfDK0Z0v-0OwbN%2FScreen%20Shot%202020-10-01%20at%2012.32.16.png?alt=media\&token=24bfb467-0053-4bfc-a3cc-ebd6f36221e8)

As new versions become available, Monday Hero tells you with a pop-up, or you can check manually by clicking **Monday Hero > Check for Updates.**\
\
That's it. Let's [Login & Create Your First Project](/v1-mac-app/getting-started/login-create-project-in-monday-hero).


# Login & Create a Project

Log in to Monday Hero. Create an iOS / Android project.

## The first step of Design to Code&#x20;

A project on Monday Hero contains everything that you need for creating the UI of your app, from designs to layout code, assets, colors, and fonts. Monday Hero automatically converts the design that's uploaded into the mobile code. This page provides a summary of you how to log in and create your first project.

### Login to Monday Hero

When you launch the app, you will see the login pop-up below. You can easily sign in to Monday Hero with your email and password that you created on the [sign-up page.](https://mondayhero.io/signup)

![Log in to Monday Hero.](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MGgvWZ3z06_Hn10zNMw%2F-MGgwOHAQOgdACtuYS3j%2FScreen%20Shot%202020-09-08%20at%2012.00.01.png?alt=media\&token=b379bc88-51f7-436c-9bcb-129393b2de44)

{% hint style="info" %}
If you have login issues, you can reset your password by clicking the **Forgot Password** button. Enter the email address you used to register with Monday Hero to Forgot Password page and you'll receive an email to reset your password.
{% endhint %}

### Create an iOS/Android Project

When you logged in successfully, you will see the projects page. On this page, you can create one and see your projects. To create your first project, click the '**+**' button, and **select a project type**. Available project types are iOS and Android (Beta). To complete creating your first project, **enter a project name**, and click the **Create** button like it's shown below.

![](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MFUjnFrwlOzHnbf1Ho-%2F-MFUp7la7hhZRhPa2yhy%2Fcreate-the-first-project.gif?alt=media\&token=bd7d4e44-5364-416a-a4ce-e69127e955d2)

Click the project and you will see the **No Screens Added To Project** screen. You'll have an empty project:

![No Screens Added to Project Page.](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MFUjnFrwlOzHnbf1Ho-%2F-MFUrmZH-di_u3rDPsc_%2FScreen%20Shot%202020-08-24%20at%2012.48.44.png?alt=media\&token=ff661fa5-0365-4f82-ad3c-ee357fa4f33d)

{% hint style="info" %}
Android is now in Private Beta and you need beta access to create your projects. You can join our [Slack via this link](https://bit.ly/SlackMondayHero) and introduce yourself in **#android-beta-request** channel to get access to the private beta.&#x20;
{% endhint %}

To continue, [**export your design** ](/v1-mac-app/getting-started/import-sketch-adobe-xd-design-into-monday-hero)from Sketch or [**invite your teammate/designer**](/v1-mac-app/getting-started/manage-team-developer-designer-role#invite-your-team-members-to-monday-hero) to your project.


# Roles & Manage the Project Team

Manage the developers, designers, and import work on Adobe XD/Sketch design to one place.

## Improve the teamwork and work collaboratively

On Monday Hero, you can work and collaborate as a project team. You can share the design and work on the same codebase for the project. This page provides information about member types and managing the project team.&#x20;

### Roles of Designers and Developers

Every project can include an unlimited number of designers. The number of developers is limited and can be changed depending on your [plan](https://mondayhero.io/pricing). You can increase your plan and seat as much as you need. If the [available plans](https://mondayhero.io/pricing) don't match with your team, you can [contact us](mailto:support@mondayhero.io?cc=nazli@mondayhero.io\&subject=The%20current%20Monday%20Hero%20plans%20are%20not%20suitable%20for%20our%20team\&body=Company%20name%3A%0D%0ACompany%20size%3A%0D%0ANumber%20of%20designers%20we%20need%3A%0D%0ANumber%20of%20developers%20we%20need%3A).

The owner of the project is the user that created the project. Only the owner of the project can manage member settings.  An owner can be either [designer](/v1-mac-app/getting-started/manage-team-developer-designer-role#designer) or [developer](/v1-mac-app/getting-started/manage-team-developer-designer-role#developer). You can see the developer and designer rights below.

#### 🖥  **Developer**

* See and edit the generated code
* Change code preferences
* Download the layout code
* Download assets, colors, and fonts code
* Export code as an Xcode or Android Studio project.

… and all of the below.

#### 🎨 **Designer**&#x20;

* Create and delete components
* Upload designs
* See colors and fonts
* Create and delete projects.

### Manage Your Team

While creating an app, it's crucial to work as a team. You can follow the steps below to see the **Member Settings** menu and manage your team.

1 - List your projects. If you're not on the projects page, click on **All Projects > List All Projects.** You will see the projects that you created/are invited before.

![Listing all projects. ](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MFeueu6Wldxgdu9Fa_t%2F-MFf-ZvA7A40GRAhzauu%2Flistallprojects.png?alt=media\&token=1e43e378-3cf4-4a03-876f-68ea383d261f)

2 - Move the mouse cursor over your project, you will see the **Settings** icon becomes visible. Click the **Settings icon** **> Member Settings** to see the members of the project.&#x20;

![Open the Member Settings of a Project.](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MFeueu6Wldxgdu9Fa_t%2F-MFf1SFWu44il7Fz5ADm%2Fmembersettings.png?alt=media\&token=75c1fb6c-e527-4769-8f8f-b646f3bfbfe4)

#### Invite Project Team Members

In [**Member Settings,**](/v1-mac-app/getting-started/manage-team-developer-designer-role#manage-your-team) you can add members with their email addresses. Monday Hero automatically sends an email invitation to the new user to join the project. When they sign up and join, they will be able to see the project.&#x20;

![Inviting a team member to a project.](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MFUjnFrwlOzHnbf1Ho-%2F-MFUsh1uy2s4JBN3nnHJ%2Finvite-friend.png?alt=media\&token=1251fba2-28a3-439c-9aa9-0aac9e62af69)

{% hint style="info" %}
When you create a project in the Monday Hero, you will be in the 'Developer' role at first. Thus, you can have whole functionality in the project.
{% endhint %}

{% hint style="info" %}
In the free plan, a project can include 1 developer and an unlimited number of designers. If you need more developer seats, you can check our [pricing](https://mondayhero.io/pricing).
{% endhint %}

#### Remove Members

In [**Member Settings,**](/v1-mac-app/getting-started/manage-team-developer-designer-role#manage-your-team) click **See More** icon shown as  "**...**" that's next to the user you want to remove and click **Remove from project**. When you remove a member, the member won't be able to see the project anymore.

![Removing a member from project.](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MFf7kYcEpI_bbfCYuAc%2F-MFfB6HroCMCSEfJ91KV%2Fremove%20from%20project.png?alt=media\&token=c532a0cb-1b1a-4b97-b106-d57af26b0195)

You can re-invite the removed member/s to your project.

#### What's Next?

Let's get down to your project! If you don't have the exported design file yet, you can get in contact with the designer(if possible) or [export your own design file](/v1-mac-app/getting-started/import-sketch-adobe-xd-design-into-monday-hero). If you already have the design, let's [start to work with Monday Hero.](/v1-mac-app/working-with-monday-hero/auto-component-code-generation)


# Prepare Design To Get Best Results

You can use this guide and check whether your Adobe XD / Sketch design file is ready to handoff to the developer on Monday Hero.

## Best Ways to Handoff a Design to Developer

You will find the steps to be sure that your Sketch/Adobe XD file is ready, and it covers some **tips and do’s to get the most accurate export**. In this way, you can share well-prepared assets and avoid possible mistakes.

**As the most important point**, all icons, background images, and logos that will be used in the mobile application must be grouped with the related items if they include more than one item, and **made exportable** in both cases. When you forget to make them exportable or have grouping problems, they will be exported in an incorrect/unwanted way as you can see below.

![Exportable Image vs non-exportable Image](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MIUH0ldhVPsKgGV3N3v%2F-MIUVFRDvgV6hiJveSD_%2Fresults.png?alt=media\&token=dc746403-4de6-435a-927c-b97a8039d954)

Making images exportable for handover is critical for mobile app development, therefore exportable images can be used easily, and help you to deal with an increased number of devices and resolutions.

Let’s make the final touches one by one.

### 🔍 Make the icons and images exportable &#x20;

Check and make the icons and images exportable. Be sure that they are **grouped with the items that they consisted of**. You can see some making exportable examples related to your design tool below.

{% tabs %}
{% tab title="Sketch" %}
![How to make an icon exportable in Sketch.](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MI3KKZ_n4Xj6Ekfjggp%2F-MI3POtphiZox0Zg3YqH%2Fsketchicon01.png?alt=media\&token=a9cd999d-b0ad-4cfc-9bc5-c66497689252)

![The preview of another icon that made exportable.](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MI3KKZ_n4Xj6Ekfjggp%2F-MI3PWZtLmB5jj7bCI42%2Fsketchicon02.png?alt=media\&token=02b8b23a-cd82-4a6d-91bf-4039bb5d93fe)
{% endtab %}

{% tab title="Adobe XD" %}
![How to make an icon exportable in Adobe XD.](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MI3KKZ_n4Xj6Ekfjggp%2F-MI3R_OVMj5J7RQu5FMU%2FAdobe-Make%20Exportable.png?alt=media\&token=abb4c1b1-f80b-4923-a2f7-dc5edf39a627)

![The preview of another icon that made exportable.](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MI3KKZ_n4Xj6Ekfjggp%2F-MI3SNnjWe-vQE5mlXq1%2FAdobe-Made%20Exportable.png?alt=media\&token=1473f07d-cc3f-46d3-9180-8b226d3cc4cd)
{% endtab %}
{% endtabs %}

After you make them exportable, you can export the design to Monday Hero. It will handle the different sizes of presets, grouping, naming, and file management for you.‍

#### **Additional Info: Supporting Multiple Screen Sizes while Converting Design to Code**

Normally, you should create different sizes of images for iOS & Android. Developers put them to the related folder, one by one for every image and icon that you need.&#x20;

For example, in Android, you should create images at 5 different pixel densities. And for iOS, you should create images at 3 different pixel densities to support multiple screen sizes. So, they can be used according to device sizes by getting the best fit.&#x20;

But with Monday Hero, you don’t need to think about the steps that we mentioned above. Just make them exportable and export design to Monday Hero when all are done. It will handle all the steps that you should consider about the assets and their management.

![The pixel densities that should be prepared normally for every item.](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MGiAmf8KjGxpi3QcclP%2F-MGiDJUVjdh9FirvNeKu%2Fimage.png?alt=media\&token=907c0f1c-4e20-4cd3-aad1-d6939a9655f2)

### 🌇 Check the background and make exportable

If you have a background image that consists of more than one item, **group, and mark as exportable**, as shown below. When you make the background exportable, you should see the image as a whole. This is a usual handover process for delivering developer to the background image.

{% tabs %}
{% tab title="Sketch" %}
![Grouping the background items](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MGiAmf8KjGxpi3QcclP%2F-MGiDfbyMq8cCKhZOWyr%2Fimage.png?alt=media\&token=7b153a01-6961-494d-83a6-0b8d33e16d95)

Select the background items and **Group** them by selecting **Group Selection** in the right-click menu. Then, you should make the group exportable. You can find how to make them exportable below. It is like other elements, but be sure that you clicked the group first not a single element.

![How to make a group exportable in Sketch.](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MGiAmf8KjGxpi3QcclP%2F-MGiDjqFbUadZ87PgYH0%2Fimage.png?alt=media\&token=24cb2e31-efc7-4515-a06a-66682645868a)

![The expected result from grouping and making the group exportable.](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MGiAmf8KjGxpi3QcclP%2F-MGiDomKV0d1eTtWShXN%2Fimage.png?alt=media\&token=10a5ad28-bb74-4b58-b305-8f08116294b0)
{% endtab %}

{% tab title="Adobe XD" %}
![Grouping the background items](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MIIRg0BFa3HkZ3PByJT%2F-MIJeDaG-K3SchgC7eCC%2Fgrupla.png?alt=media\&token=36707650-32c0-4548-9ab3-7ac5defd1c69)

Select the background items and **Group** them by selecting **Group Selection** in the right-click menu. Then, you should make the group exportable. You can find how to make them exportable below. It is like other elements, but be sure that you clicked the group first not a single element.

![How to make a group exportable in Adobe XD.](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MIIRg0BFa3HkZ3PByJT%2F-MIJfCiWKJo2yqJzsDjE%2Fexport.png?alt=media\&token=573c1853-73ac-4a91-af93-579577da90dd)
{% endtab %}
{% endtabs %}

**The background should include only one/grouped exportable image.** You can find another example below that developers mostly face and have trouble in the design.<br>

![Example of using gradient in a rectangle to make the design look better.](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MIIRg0BFa3HkZ3PByJT%2F-MIJxt5gAeoVSGtiZF4h%2Fbackgg.png?alt=media\&token=1451b904-dec1-43ad-a285-68077f660378)

In this example, the designer put a rectangle over the background and added a gradient to it to make it look better. Now, the background image has 2 layers and looks as imagined. **To make this background ready for development**, it should be grouped/merged/masked depends on your case, and mark exportable. Then, the background will be ready to use as an image.

### &#x20;🖌 **Group the paths and lines and make exportable**

If your design includes more than one paths/lines you should **group and make them exportable** to have the complete look. Otherwise, they can look improperly because every path will be defined and placed as a single image. Let's see some examples.

{% tabs %}
{% tab title="Sketch" %}
![Example of a design with many pathes.](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MJ1Ni2zBMQ0HB2nrG3I%2F-MJ1oGABhMABlkNDtyzL%2Fsketch-logo.png?alt=media\&token=e54e3392-f721-4ba4-990e-6c4b9937e4a1)

![Grouped and exportable paths in Sketch.](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MIIRg0BFa3HkZ3PByJT%2F-MIJnJgvje9uMZTURoMW%2Fexportable.png?alt=media\&token=eeb77130-f301-40ba-b85d-607970b15b58)
{% endtab %}

{% tab title="Adobe XD" %}
![Example of a design with many pathes.](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MJ1ylw_T1rhBP1c9ND9%2F-MJ2Ktx457gYaBSTFYn-%2Fadobe-icon-export.png?alt=media\&token=365412fb-1d8a-42f3-8f01-5961af4e82a1)

![Grouped and exportable paths in Adobe XD.](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MIIRg0BFa3HkZ3PByJT%2F-MIJtqjyuzsp4wvKiZV3%2Fexportable.png?alt=media\&token=7017e757-77b2-4931-b253-0c5924bacf48)
{% endtab %}
{% endtabs %}

You can group and mark them exportable so that the paths and lines can come together and get export in one image seamlessly.&#x20;

### &#x20;👀 Check the logo and make exportable

Don’t forget to **make** other icons **exportable**, such as the logo. You can leave other layers as they are. When you make exportable an item, be sure that you check the preview on the below right.

{% tabs %}
{% tab title="Sketch" %}
![Preview of an exportable icon.](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MGiAmf8KjGxpi3QcclP%2F-MGiEDWa3LTNhyuxNbul%2Fimage.png?alt=media\&token=42d86900-4661-4a2c-9606-0fc137a86252)
{% endtab %}

{% tab title="Adobe XD" %}
![Preview of an exportable icon.](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MIIRg0BFa3HkZ3PByJT%2F-MIJuoe_tKI5p1_44VIo%2Fexporticon.png?alt=media\&token=b61e6242-5eb9-4e9d-8e7d-d0df7eb141f4)
{% endtab %}
{% endtabs %}

### 👩‍🎨 Use only the design&#x20;

Mockup (Device curves, etc.) should not be in the Artboard design. Only keep the things that essential for the app.

![Mockup rectangle/designs should be removed.](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MGiAmf8KjGxpi3QcclP%2F-MGiEUiMVr_PeNTWLSHo%2Fimage.png?alt=media\&token=449a79c7-ef10-41c1-b09e-dbcb1bc6d3eb)

### 📐 Remove the guiding objects

We are aware that designers do lots of tricks to have a perfect design. To align/measure the objects, it's possible to use the rectangles like below, or vectors, lines, or some shapes. Before exporting the screens, please be sure to remove these handy objects/layers.

![The lines or shapes that used for perfect design should be removed.](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MGiAmf8KjGxpi3QcclP%2F-MGiEcxKCCdHwAiPxZc6%2Fimage.png?alt=media\&token=981917af-3e06-416f-bc90-a2705d963dd3)

### 📝 Check the texts

And as the last one of this step, check your text area. If you leave the text area larger than you need while designing, it may cause some errors related to constraints and unwanted results in the export.

![The text area shouldn't be larger than you need.](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MGiAmf8KjGxpi3QcclP%2F-MGiFCTVEhXUmGCkplU1%2Fimage.png?alt=media\&token=e2d19580-035b-475e-99a0-cc2ac64fa61b)

That’s all for checking the design file. You are ready to continue with [Step 2: Export Design to Monday Hero](/v1-mac-app/getting-started/import-sketch-adobe-xd-design-into-monday-hero).


# Import Design File Into Monday Hero

Import design file to convert the Adobe XD / Sketch design to iOS/Android code.

## Import the UI Design and Auto-Generate the Assets

Sketch plugin will be automatically installed when you install Monday Hero. You should select the artboard/s that you want to work on in the design tool. Click **Plugins > Monday Hero > Export**.

{% hint style="warning" %}
If you can’t see/don't have the plugin in Sketch/Adobe XD, **Plugins > Monday Hero**, you can manually download it from [here](https://mondayhero.io/download) and [**double-click to install**](/v1-mac-app/getting-started/install-app-and-plugin) in seconds.
{% endhint %}

### Sketch / Adobe XD Plugin to Import Design

{% tabs %}
{% tab title="Sketch" %}
![Exporting designs from Sketch via Monday Hero Plugin.](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MGi65jd_HPR07_RpMnM%2F-MGi6frEFLw5Fb9z7p88%2Fimage.png?alt=media\&token=efe7ee6c-1b68-46bb-bc41-86c19d2a04fd)
{% endtab %}

{% tab title="Adobe XD" %}
![Exporting designs from Adobe XD via Monday Hero Plugin.](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MIK7EgdXPf0b0MGzEDJ%2F-MIK8Fb8Md_cq8V1aNbJ%2FScreen%20Shot%202020-09-28%20at%2017.36.46.png?alt=media\&token=9633c03d-1655-402f-a7f6-0941e1558f0e)
{% endtab %}
{% endtabs %}

After clicking the export button, the project selection pop-up will appear. Choose the project and click **Import**.

![Monday Hero Plugin — Project Selection Screen](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MIYOn7El3lH4m3aXDkY%2F-MIYT9LLcuwrDdeepmSK%2Fexport.png?alt=media\&token=d57ab050-d87a-423e-b622-268cb4980804)

You will see the **Importing Design** pop-up window. While you are watching the animation, Artboards you've selected are getting analyzed and uploaded to your project.

![Uploading designs through Monday Hero Plugin.](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MGiZHxI_4R9GoKjoB33%2F-MGi_iPPqtszFaGH-1Qe%2Fimage.png?alt=media\&token=d13b3799-d7d6-409a-a331-3d0828c7e49a)

When the animation finishes, the screens are added into the project as can be seen below and the design file is exported.

![Monday Hero - Screens: Uploaded screens under Project Screens window.](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MGiZHxI_4R9GoKjoB33%2F-MGiaBWy_runHotKjZlC%2Fimage.png?alt=media\&token=84acb97e-42ac-4e1b-88a8-bb114c261704)

You can continue to work on the screens [individually](/v1-mac-app/working-with-monday-hero/component-convert-to-ios-android-code) or [share them with your team](/v1-mac-app/getting-started/manage-team-developer-designer-role).


# Automatically Generated Components

Monday Hero can automatically understand some components and convert design to Swift/Kotlin code.

## Auto-Generated Specs from Sketch/Adobe XD to Developers

Monday Hero automatically understands the images, texts, and views in the design. On this page, you can find the code that Monday Hero creates code for you. In design tools, everything consists of texts, images, or views. Monday Hero understands and generates this code automatically for you. The details are explained below:

* [Labels](/v1-mac-app/working-with-monday-hero/auto-component-code-generation/design-to-text-code)
* [Images](/v1-mac-app/working-with-monday-hero/auto-component-code-generation/design-image-to-code)
* [Views](/v1-mac-app/working-with-monday-hero/auto-component-code-generation/design-to-view-code)

However, it's so common to have components/widgets like buttons, lists, or text areas that are essential in the code. You can find them on the [Convert to Components](/v1-mac-app/working-with-monday-hero/component-convert-to-ios-android-code) page.&#x20;


# Views

Monday Hero can automatically understand the views, and convert design to Swift/Kotlin code.

## View Design to Code

A view expresses a single item on the user interface. It could be a shape like a rectangle, a control item such as a button, an input text field, or an image. A view is a defined specific area on the screen which can be configured to respond to touch events, or it can be used for enriching the user experience.

As can be seen below, the **Follow** button has designed with a blue rectangle and a text. Monday Hero automatically detected that the blue rectangle/background is a `View` and the text is a `Label`. Let's check how Monday Hero detected this`View`and generate its code. The blue rectangle on the image below is detected as `View`and called`containerView`, the code will be generated like below.&#x20;

![A View example.](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-ML7cEtJOdBKuhrN8EZ9%2F-ML7ehsymWm12pg0jph4%2Fgenerate-view-code-monday-hero.png?alt=media\&token=48d36c1a-e205-40a9-a265-73f4007028c8)

On this page, `View`code will be explained, detailed info about texts and images can be found on the next pages. \
[Learn more about images here.](/v1-mac-app/working-with-monday-hero/auto-component-code-generation/design-image-to-code)\
[Learn more about texts here.](/v1-mac-app/working-with-monday-hero/auto-component-code-generation/design-to-text-code)

### Generated iOS/Android Code of the View&#x20;

The code will be generated like below and constraints are defined in the Storyboard file.&#x20;

{% tabs %}
{% tab title="iOS" %}

```swift
import UIKit

class ProfilePageViewController: UIViewController {
	
	// MARK: - Properties
	@IBOutlet private weak var containerView: UIView!

	override func viewDidLoad() {
		super.viewDidLoad()
		setupViews()
		setupLayout()
	}
}

extension ProfilePageViewController {
	private func setupViews() {

		containerView.layer.cornerRadius = 6
		containerView.layer.masksToBounds =  true 
		containerView.backgroundColor = UIColor.cerulean

	}

	private func setupLayout() { 
		//Constraints are defined in Storyboard file.
	}
}
```

{% endtab %}

{% tab title="Android" %}

```markup
<!--activity_profile_page.xml-->
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<androidx.constraintlayout.widget.ConstraintLayout
	xmlns:android="http://schemas.android.com/apk/res/android"
	xmlns:app="http://schemas.android.com/apk/res-auto"
	xmlns:tools="http://schemas.android.com/tools"
	android:layout_width="match_parent"
	android:layout_height="match_parent"
	tools:context=".ProfilePageActivity"
	android:background="?attr/daisy">
	
	<View
	android:id="@+id/containerView"
	android:layout_width="78dp"
	android:layout_height="26dp"
	android:background="@drawable/baseview_background_drawable"
	android:layout_marginEnd="56dp"
	android:layout_marginTop="42dp"
	android:layout_marginBottom="37dp"
	app:layout_constraintStart_toEndOf="@+id/profilPictureImageView"
	app:layout_constraintEnd_toEndOf="parent"
	app:layout_constraintTop_toBottomOf="@+id/nolanAlexTextView"
	app:layout_constraintBottom_toTopOf="@+id/alexanderNolanTextView"/>
	
</androidx.constraintlayout.widget.ConstraintLayout>
```

```markup
<!--Drawables/containerview_background_drawable.xml-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
  <item>
    <shape android:shape="rectangle">
      <solid android:color="?attr/cerulean"/>
      <corners android:radius="6dp"/>
    </shape>
  </item>
</selector>
```

{% endtab %}
{% endtabs %}

You can also read and see how these Views become a component together. [You can check how to create a button component here.](/v1-mac-app/working-with-monday-hero/component-convert-to-ios-android-code/convert-button-design-to-ios-android-code)


# Texts

Monday Hero can automatically understand the texts, and convert design to Swift/Kotlin code.

## Text Design to Code

Texts are automatically detected and their code is generated by Monday Hero. With texts, you can describe an interface element or provide messages. Texts display static text with no editing features. A Simple label image is and its code is shown below.

![A label example.](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MGsXmoEr6fQRBjxagGX%2F-MGxGDlge5EgSoQidZwq%2FGroup%2010.png?alt=media\&token=bb845252-a895-4e91-bb02-6c0cca10b8dc)

### Generated iOS/Android Code of Texts

{% tabs %}
{% tab title="iOS" %}

## Label

Texts are called as `Label` in the Swift language. Let's see the generated code and its attributes.

```swift
//HomePageViewController.swift 
import UIKit

class HomePageViewController: UIViewController {

//Connection from an Interface Builder to a UI component
@IBOutlet private weak var simpleExampleLabel: UILabel!

	override func viewDidLoad() {
		super.viewDidLoad()
		setupViews()
	}

}

extension HomePageViewController {
	private func setupViews() {
	
		//Text properties
		simpleExampleLabel.text = NSLocalizedString("simple.example", comment: "")
		simpleExampleLabel.textColor = UIColor.black
		simpleExampleLabel.numberOfLines = 0
		simpleExampleLabel.font = UIFont.textStyle10
		simpleExampleLabel.textAlignment = .center
		
}
```

{% endtab %}

{% tab title="Android" %}

## TextView

Texts are called as `TextView` in the Android Kotlin/Java XML. Let's see the already generated code and its attributes.

```markup
<!--activityExample.xml-->

	<TextView
	android:id="@+id/titleTextView"
	android:layout_width="0dp"
	android:layout_height="wrap_content"
	android:text="@string/title_text"
	style="@style/textStyle13"
	android:textAlignment="center"
	android:textColor="?attr/black"
	android:layout_marginStart="39dp"
	android:layout_marginEnd="39dp"
	android:layout_marginBottom="12dp"
	app:layout_constraintStart_toStartOf="parent"
	app:layout_constraintEnd_toEndOf="parent"
	app:layout_constraintTop_toBottomOf="@+id/mondayHeroLogoImageView"
	app:layout_constraintBottom_toTopOf="@+id/descriptionTextView"/>
	
```

```markup
<!--strings.xml-->
<string name="title_text">"SimpleText"</string>
<string name="description_text">"This is a textView example and textViews are better while it kept short and legible."</string>
```

{% endtab %}
{% endtabs %}


# Images

Monday Hero can automatically understand the images, and convert design to Swift/Kotlin code.

## Images in Design to Code

Images can be used to improve the UX, capture users' attention, or differentiate the product. ImageViews are non-interactive by default. Images in the designs are automatically detected after exporting. They are saved as assets, and their code is generated by Monday Hero. Icons and logos are also classified as images. Let's have an example and understand it clearly. A simple image, an icon, a logo, and their generated codes can be seen below. &#x20;

![Images, icon, and logo example.](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-ML7eoJNXnSj7CuGYgY_%2F-ML7iI9Vu3pWRnFKaWvP%2Fimage-icon-logo-code-generation-monday-hero.png?alt=media\&token=c6c13e85-cffc-4177-b5e1-0fb733aa2d15)

{% hint style="danger" %}
All images, logos, and icons **should be marked exportable** before exporting the design to Monday Hero with plugins. Otherwise, the code and assets are not generated for them. [Click and read here to learn more and see examples.](/v1-mac-app/getting-started/design-handoff-to-ios-android-developer)
{% endhint %}

### Generated iOS/Android Code of Images

Images are called and defined in `ImageView` to display image resources in both Swift/XML/Kotlin language. Let's see the generated code and its attributes.

{% tabs %}
{% tab title="iOS" %}
In iOS, Images are connected to builder and there is no additional code below since the constraints are already defined in the storyboard file automatically.

```swift
//ListPageViewController.swift 
import UIKit

class ListPageViewController: UIViewController {
	
	// MARK: - Properties
  //Connection from an Interface Builder to a UI component
	@IBOutlet private weak var photoImageView: UIImageView!
	@IBOutlet private weak var iconImageView: UIImageView!
	@IBOutlet private weak var logoImageView: UIImageView!


	override func viewDidLoad() {
		super.viewDidLoad()
		setupViews()
		setupLayout()
	}
}

extension ListPageViewController {
	private func setupViews() {

	}

	private func setupLayout() { 
		//Constraints are defined in Storyboard file.
	}
}
```

{% endtab %}

{% tab title="Android" %}
In Android, the source, layout, constraints, etc. all generated automatically as can be seen below.

```markup
<!--activityExample.xml-->
<androidx.constraintlayout.widget.ConstraintLayout
	xmlns:android="http://schemas.android.com/apk/res/android"
	xmlns:app="http://schemas.android.com/apk/res-auto"
	xmlns:tools="http://schemas.android.com/tools"
	android:layout_width="match_parent"
	android:layout_height="match_parent"
	tools:context=".ListPageActivity"
	android:background="?attr/daisy">
	
	<ImageView
	android:id="@+id/photoImageView"
	android:layout_width="0dp"
	android:layout_height="wrap_content"
	android:src="@drawable/photo2"
	android:scaleType="centerCrop"
	android:layout_marginStart="20dp"
	android:layout_marginEnd="20dp"
	android:layout_marginBottom="13dp"
	app:layout_constraintStart_toStartOf="parent"
	app:layout_constraintEnd_toEndOf="parent"
	app:layout_constraintTop_toBottomOf="@+id/popularTextView"
	app:layout_constraintBottom_toTopOf="@+id/rosieDelTextView"/>
	
	<ImageView
	android:id="@+id/iconImageView"
	android:layout_width="wrap_content"
	android:layout_height="wrap_content"
	android:src="@drawable/icon"
	android:layout_marginEnd="19dp"
	android:layout_marginTop="14dp"
	android:layout_marginBottom="20dp"
	app:layout_constraintStart_toEndOf="@+id/likesTextView"
	app:layout_constraintEnd_toEndOf="parent"
	app:layout_constraintTop_toBottomOf="@+id/photoImageView2"
	app:layout_constraintBottom_toTopOf="@+id/photoImageView"/>
	
	<ImageView
	android:id="@+id/logoImageView"
	android:layout_width="0dp"
	android:layout_height="wrap_content"
	android:src="@drawable/logo"
	android:layout_marginTop="267dp"
	android:layout_marginBottom="211dp"
	app:layout_constraintStart_toStartOf="parent"
	app:layout_constraintEnd_toEndOf="parent"
	app:layout_constraintTop_toTopOf="parent"
	app:layout_constraintBottom_toTopOf="@+id/copyrightTextView"/>
	
</androidx.constraintlayout.widget.ConstraintLayout>
```

{% endtab %}
{% endtabs %}


# Convert to Components

Import the Sketch/Adobe XD design and convert design to iOS/Android code in minutes.

## Convert Components and Generate Swift/Kotlin & XML Code

Monday Hero automatically understands the images, texts, and views in the design. However, it's so common that components/widgets like buttons, lists, or text areas are essential in the code. It's so easy to convert the layers to the components/widgets. You will also have the styles within the code.&#x20;

Below, there is an example of an app that consists of lists, grids, buttons, and more. Monday Hero can create every single component in the app and the design will be used to show how to do it. If you want to see the tutorial about it, [here](/v1-mac-app/step-by-step-tutorials/travel-app-tutorial-design-to-ios-code) is the link. &#x20;

Follow the steps to explore every single component and start building your app! The first step is to see [how to create a component](/v1-mac-app/working-with-monday-hero/component-convert-to-ios-android-code/how-to-convert-component-to-ios-android-code) briefly.<br>

![](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MHGfp9_wQW4RPOAdqRl%2F-MHGmbRFy7VJYN-El9Yq%2FThumbnail%20Travel%20App.png?alt=media\&token=9aa465f9-1d1c-4deb-b22f-f1a9ea6de861)


# How to Convert to Components

Import your Adobe XD/Sketch design, then convert to components and export all the colors, fonts, assets, images, and generated code for iOS/Android in one place.

## Convert Components to Code, and Save Time on Manual Coding

When you import a design, you will get all the style, images, and texts and now it's time to convert some images and texts into components like buttons or lists! Depending on your need, it's possible to shape the code and layers.

Below there is a Gif that shows how to create a button. All component flows are similar to each other.

* Click **Create Component** button.
* Select the class of your component. Now it can be Button, TextView, SearchBar, StatusBar and Lists or grid.&#x20;
* **Click** **and** **drag** to select layers that you want to convert to a component.&#x20;
* **Name** your component, in the Gif, it's called followButton and click **Next.**
* For every layer, select the fields that needed to defined like title, image, or background image. The options will be shown on the list.&#x20;
* Click **Add** and **Save** to complete the flow.

![A component creation example.](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MGieJC5eZitCD6GvJdb%2F-MGif7Y6holkg_MzeIqE%2Fcreate-button.gif?alt=media\&token=e961c25a-3a31-46f8-9387-7dad233c30bf)

{% hint style="info" %}
[**ImageView,**](/v1-mac-app/working-with-monday-hero/auto-component-code-generation/design-image-to-code) [**View**](/v1-mac-app/working-with-monday-hero/auto-component-code-generation/design-to-view-code)**,** and [**Label/TextView** ](/v1-mac-app/working-with-monday-hero/auto-component-code-generation/design-to-text-code)components are automatically detected and generated by Monday Hero.
{% endhint %}

### Supported Components for Code Generation

Creating a component is almost the same for other components. You can find supported components for iOS and Android below.&#x20;

* [Buttons](/v1-mac-app/working-with-monday-hero/component-convert-to-ios-android-code/convert-button-design-to-ios-android-code)
* [TextFields](/v1-mac-app/working-with-monday-hero/component-convert-to-ios-android-code/convert-text-to-ios-android-code)
* [Text Areas ](/v1-mac-app/working-with-monday-hero/component-convert-to-ios-android-code/convert-text-area-to-ios-android-code)
* [Status Bar](/v1-mac-app/working-with-monday-hero/component-convert-to-ios-android-code/convert-status-bar-design-to-ios-android-code)
* [Search Bar](/v1-mac-app/working-with-monday-hero/component-convert-to-ios-android-code/convert-search-bar-design-to-ios-android-code)
* [Lists](/v1-mac-app/working-with-monday-hero/component-convert-to-ios-android-code/list-grid-design-to-ios-android-code/list-design-to-ios-android-code)
* [Grids](/v1-mac-app/working-with-monday-hero/component-convert-to-ios-android-code/list-grid-design-to-ios-android-code/grid-design-to-ios-android-code)


# Convert to Button

Convert Button component to Android/iOS code.

## Button Design to Swift/Kotlin Code

Buttons are the most used components in apps and they have app-specific actions. Buttons can have a **title, background,** or **image** as property/clas&#x73;**.** They may include more than one property. A button can have both properties at the same time. For example, background and title, or title and image, etc.

**Buttons have 3 properties in Monday Hero:**

**Title:** The text displayed over the button.&#x20;

**Background Image:** The image used as the background of the button. Mostly it used when there is a text over the button.

**Image:** Icons are good examples of image buttons. They designed for having app-specific actions.&#x20;

![Button examples with different properties.](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MLDr5zEL85YDAyXJycT%2F-MLGwlZew4QaKOkWNT1i%2Fbutton-design-to-code.png?alt=media\&token=a42f8e58-ddec-489d-91b8-38f9c62d8da2)

{% hint style="info" %}
If a button has only a **background color**, Monday Hero can automatically understand the background color of the button. It will be defined as a `View` with the color.
{% endhint %}

In this case, Monday Hero automatically understands the blue rectangle as View and gets background color from the rectangle. So, defining the "Follow" label as the **Title** of the button will be enough. How to create a button and add a property/class can be seen in the GIF below.

![Example of button creation that has a title in Monday Hero.](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MGieJC5eZitCD6GvJdb%2F-MGif7Y6holkg_MzeIqE%2Fcreate-button.gif?alt=media\&token=e961c25a-3a31-46f8-9387-7dad233c30bf)

When the button is created, the generated code will be like below.

### Generated iOS/Android Code

{% tabs %}
{% tab title="iOS" %}
The button code created is added to the page with the styles. Constraints are defined in the Storyboard file.

```swift
//ProfilePageViewController.swift
import UIKit

class ProfilePageViewController: UIViewController {
	
	// MARK: - Properties
  //Connection from an Interface Builder to a UI component
  
  // The button with an image and text
	@IBOutlet private weak var followButton: UIButton!
	@IBOutlet private weak var buttonImageView: UIImageView!
	
	//Button with an only image
	@IBOutlet private weak var profileButton: UIButton!

 	//Button with a text and background image
  @IBOutlet private weak var loginButton: UIButton!
  
	override func viewDidLoad() {
		super.viewDidLoad()
		setupViews()
		setupLayout()
	}
}

extension ProfilePageViewController {
	private func setupViews() {
		
		// The button with an image and text
		followButton.layer.cornerRadius = 6
		followButton.layer.masksToBounds =  true 
		followButton.backgroundColor = UIColor.cerulean
		followButton.setTitle(NSLocalizedString("follow", comment: ""),for: .normal)
		followButton.setTitleColor(UIColor.daisy, for: .normal)
		followButton.titleLabel?.font = UIFont.textStyle7
		followButton.contentHorizontalAlignment = .leading 
		followButton.contentEdgeInsets = UIEdgeInsets(top: 6, left: 9 , bottom: 6, right: 9)

		//Button with an only image
		profileButton.setImage(UIImage(named: "profileIcon") , for: .normal)
		
		//Button with a text and background image
		loginButton.setTitle(NSLocalizedString("login", comment: ""),for: .normal)
		loginButton.setTitleColor(UIColor.white, for: .normal)
		loginButton.titleLabel?.font = UIFont.textStyle2
		loginButton.contentHorizontalAlignment = .center 
		loginButton.setBackgroundImage(UIImage(named: "loginBackground") , for: .normal)
	}

	private func setupLayout() { 
		//Constraints are defined in Storyboard file.
	}
}

```

{% endtab %}

{% tab title="Android" %}
The button code created and added to the page with the styles. &#x20;

```markup
<!--activityUserProfile.xml-->
<!--The button with a background color and text-->
<Button
	android:id="@+id/followButton"
	android:layout_width="match_parent"
	android:layout_height="wrap_content"
	android:text="@string/follow"
	android:textAllCaps="false"
	android:background="@drawable/followbutton_background_drawable"
	style="@style/textStyle11"
	android:textAlignment="textStart"
	android:textColor="?attr/daisy"
	android:paddingLeft="9dp"
	android:paddingRight="9dp"
	android:paddingTop="6dp"
	android:paddingBottom="6dp"
	android:layout_marginEnd="56dp"
	android:layout_marginTop="42dp"
	android:layout_marginBottom="37dp"
	app:layout_constraintStart_toEndOf="@+id/profilPictureImageView"
	app:layout_constraintEnd_toEndOf="parent"
	app:layout_constraintTop_toBottomOf="@+id/nolanAlexTextView"
	app:layout_constraintBottom_toTopOf="@+id/alexanderNolanTextView"/>
	
<!--Button with an only image-->	
<Button
	android:id="@+id/profileButton"
	android:layout_width="wrap_content"
	android:layout_height="wrap_content"
	android:textAllCaps="false"
	android:background="@android:color/transparent"
	android:drawableBottom="@drawable/profileicon"
	android:layout_marginEnd="23dp"
	android:layout_marginBottom="13dp"
	app:layout_constraintStart_toEndOf="@+id/buttonImageView"
	app:layout_constraintEnd_toEndOf="@+id/baseView"
	app:layout_constraintTop_toBottomOf="@+id/userPicturesBID"
	app:layout_constraintBottom_toBottomOf="@+id/baseView"/>

<!--Button with a text and background image -->
<Button
	android:id="@+id/loginButton"
	android:layout_width="0dp"
	android:layout_height="wrap_content"
	android:text="@string/login"
	android:textAllCaps="false"
	android:background="@android:color/transparent"
	style="@style/textStyle15"
	android:textAlignment="center"
	android:textColor="?attr/white"
	android:layout_marginStart="108dp"
	android:layout_marginEnd="86dp"
	android:layout_marginBottom="18dp"
	app:layout_constraintStart_toStartOf="parent"
	app:layout_constraintEnd_toEndOf="parent"
	app:layout_constraintTop_toBottomOf="@+id/rectangleView"
	app:layout_constraintBottom_toBottomOf="parent"/>
```

```markup
<!--Drawables/followbutton_background_drawable.xml-->
<!--The button with a background color and text-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
  <item>
    <shape android:shape="rectangle">
      <solid android:color="?attr/cerulean"/>
      <corners android:radius="6dp"/>
    </shape>
  </item>
</selector>
```

{% endtab %}
{% endtabs %}

That's all for creating buttons on Monday Hero.


# Convert to TextField/EditText

Convert TextField/EditText component to Android/iOS code.

## TextField in Swift and EditText in Kotlin to Code

TextField in Swift and EditText in Kotlin is generally used for form pages. It's generally used for the user to enter the email and password like in the images below. TextFields have different names and properties in iOS and Android, they're explained below.

### Examples of Components

{% tabs %}
{% tab title="iOS" %}

## TextField

TextFields have 3 properties in Monday Hero :&#x20;

**Text:** The initial text displayed by the text field. You can specify the text as a plain string or as an attributed string.\
**Placeholder:** A placeholder is a text displayed by the textField when the string is empty. Typing any text into the text field hides this string. \
**Left icon:** You can add an icon to the left side of the textField.&#x20;

![TextField example.](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MGrIvvQkqS1zsILEfc7%2F-MGsFSj-e_eRsF9eLiRQ%2FScreen%20Shot%202020-09-10%20at%2016.43.32.png?alt=media\&token=0b97e74c-f3d4-46c8-a8b0-2596ee1cc2db)
{% endtab %}

{% tab title="Android" %}

## Edit Text

`EditText`is used for entering and modifying text.

Additionally, Monday Hero also lets you select and generate 3 attributes of this component:\
**`Text`:** The initial text displayed by the text field. You can specify the text as a plain string or as an attributed string.\
**`Hint`:** A hint is a text displayed by the `EditText` when the string is empty. Typing any text into the text field hides this string. \
**`Left icon`:** You can add an icon to the left side of the `EditText`.&#x20;

![EditText example in a Login screen.](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MGxKgAFa205xFnql9xd%2F-MGxXftQs90sbZASYai-%2FScreen%20Shot%202020-09-11%20at%2017.21.16.png?alt=media\&token=d1fdc683-761d-4678-baf3-dc170f4b67ad)
{% endtab %}
{% endtabs %}

### Generated iOS/Android code

{% tabs %}
{% tab title="iOS" %}
Let's see the code that generated for the e-mail `textField`.

```swift
//SignInViewController.swift
import UIKit

class SignInViewController: UIViewController {

//Connection from an Interface Builder to a UI component
@IBOutlet private weak var emailTextField: UITextField!

	override func viewDidLoad() {
		super.viewDidLoad()
		setupViews()
	}
}

extension SignInViewController {
	private func setupViews() {
	
		//TextField properties
		emailTextField.layer.borderColor = UIColor.salt.cgColor
		emailTextField.layer.borderWidth =  1
		emailTextField.layer.cornerRadius = 21.5
		emailTextField.layer.masksToBounds =  true 
		emailTextField.backgroundColor = UIColor.daisy
		emailTextField.placeholder = NSLocalizedString("email", comment: "")
		emailTextField.textColor = UIColor.indigo
		emailTextField.font = UIFont.textStyle5
		emailTextField.textAlignment = .left 
		emailTextField.setLeftView(leftViewFrame : CGRect(x: 0, y: 0, width: 22, height: 43))
	
	}		
}
```

{% endtab %}

{% tab title="Android" %}
Let's see the generated code for `EditText`. You can also see the layout constraints.

```markup
!--activityLogin.xml-->
<EditText
	android:id="@+id/email"
	android:layout_width="0dp"
	android:layout_height="wrap_content"
	android:background="@drawable/email_background_drawable"
	style="@style/textStyle"
	android:text="@string/email"
	android:gravity="left|center"
	android:textColor="?attr/indigo"
	android:textColorHint="?attr/indigo"
	android:paddingLeft="22dp"
	android:paddingRight="22dp"
	android:layout_marginStart="39dp"
	android:layout_marginEnd="38dp"
	android:layout_marginBottom="21dp"
	app:layout_constraintStart_toStartOf="parent"
	app:layout_constraintEnd_toEndOf="parent"
	app:layout_constraintTop_toBottomOf="@+id/halfBackground"
	app:layout_constraintBottom_toTopOf="@+id/password"/>
```

```markup
<!--Drawables/email_background_drawable.xml-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
  <item>
    <shape android:shape="rectangle">
      <solid android:color="?attr/daisy"/>
      <stroke android:width="1dp" android:color="?attr/salt"/>
      <corners android:radius="21dp"/>
    </shape>
  </item>
</selector>
```

{% endtab %}
{% endtabs %}

You can do further edit/configurations in your IDE after you export it.


# Convert to Text Area

Convert TextView/Text component to iOS/Android code.

## TextView/Text to Code

Text View allows the user to enter **more than one line** of text. A textView image is and its code is shown below.

![A Text View Example](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MGrIvvQkqS1zsILEfc7%2F-MGsAY-is6wUB907gj3K%2FGroup%2011.png?alt=media\&token=993d38ec-7fa5-4620-bc28-f150cf268f8a)

While creating the component, you can add **text** into TextView to inform on Monday Hero.

<div align="center"><img src="https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MKocrtaTvG6EVBY72o0%2F-MKodWYyvaehCNvJes1L%2FScreen%20Shot%202020-10-29%20at%2016.55.57.png?alt=media&amp;token=3ce9076b-d724-4af6-b1cb-8b90a6f9648f" alt="TextView Monday Hero Selections"></div>

### Generated iOS/Android Code of TextView

{% tabs %}
{% tab title="iOS" %}

```swift
//HomePageViewController.swift 
import UIKit

class HomePageViewController: UIViewController {

//Connection from an Interface Builder to a UI component
@IBOutlet private weak var addNotesTextView: UITextView!

	override func viewDidLoad() {
		super.viewDidLoad()
		setupViews()
	}
}

extension HomePageViewController {
	private func setupViews() {
		//TextView properties
		addNotesTextView.backgroundColor = UIColor.daisy2
		addNotesTextView.text = NSLocalizedString("add.note.here", comment: "")
		addNotesTextView.textColor = UIColor.spruce_40
		addNotesTextView.font = UIFont.textStyle5
		addNotesTextView.textAlignment = .left
			}
}		
```

{% endtab %}

{% tab title="Android" %}
Android does not have a separate component for Text Areas, the same code is used for the [Texts](/v1-mac-app/working-with-monday-hero/auto-component-code-generation/design-to-text-code) are also used for Text Areas.&#x20;

{% content-ref url="/pages/-MKAkeUaR98eGvVIsvk-" %}
[Texts](/v1-mac-app/working-with-monday-hero/auto-component-code-generation/design-to-text-code)
{% endcontent-ref %}
{% endtab %}
{% endtabs %}


# Convert to Status Bar

Status Bar design in Adobe XD/Sketch should be removed, projects should use a system-provided status bar.

## Status Bar design in Adobe XD/Sketch can be removed before exporting the code.

When you have a Status Bar in the design, you can convert it to a Status Bar component to prevent its generation in your code. Mobile users expect the status bar to be consistent systemwide so you should use a system-provided status bar. You can do your edits/configuration after you export your project.

![The Status Bar shouldn't be in the design.](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MGsXmoEr6fQRBjxagGX%2F-MGxAhu2fVs1u9jQEszc%2FArtboard.png?alt=media\&token=9c398467-871f-4fab-aad0-eddaa238de65)

### Resources for iOS and Android Developers

{% hint style="info" %}
&#x20;You can see the recommended use of StatusBar for Swift in **developer.apple.com** [here](https://developer.apple.com/design/human-interface-guidelines/ios/bars/status-bars/) and for Android, **developer.android.com** [here](https://developer.android.com/training/system-ui).
{% endhint %}


# Convert to Search Bar

Convert Search Bar component to iOS/Android code.

## Search Bar Design to Swift/Kotlin Code

A search bar allows users to search values by typing text into a field.&#x20;

![](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MKoiOYms5cxc9s7YGQK%2F-MKokCwgbhlqJ83gQjCE%2Fplaceholder.png?alt=media\&token=907e2f50-7fea-49ee-a0e7-37dfb13d302f)

### Component's Property info for iOS/Android

{% tabs %}
{% tab title="iOS" %}
It's called`SearchBar` in Swift language. It can have 2 properties on Monday Hero:&#x20;

\
**Text:** The initial text displayed by the text field. You can specify the text as a plain string or as an attributed string.\
**Placeholder:** A placeholder is a text displayed by the SearchBar when the string is empty. Typing any text into the text field hides this string.&#x20;
{% endtab %}

{% tab title="Android" %}
Searchbar is called`searchView`in Android and has `hint`property on Monday Hero.

\
**`Hint`:** A hint is a text displayed by the searchView when the string is empty. Typing any text into the text field hides this string. It's called placeholder in iOS.
{% endtab %}
{% endtabs %}

### Generated iOS/Android Code

Let's see the generated code. Monday Hero will generate it even the rectangle's `cornerRadius` value included.

{% tabs %}
{% tab title="iOS" %}

```swift
//HomePageViewController.swift 
import UIKit

class HomePageViewController: UIViewController {

//Connection from an Interface Builder to a UI component
@IBOutlet private weak var searchSongSearchBar: UISearchBar!

	override func viewDidLoad() {
		super.viewDidLoad()
		setupViews()
	}
}

extension HomePageViewController {
	private func setupViews() {
	
		//SearchBar properties
		searchSongSearchBar.layer.cornerRadius = 10
		searchSongSearchBar.layer.masksToBounds =  true 
		searchSongSearchBar.setBackgroundImage(UIImage(), for: .any, barMetrics: .default)
		searchSongSearchBar.placeholder = NSLocalizedString("search", comment: "")
		if let placeholderInsidesearchSongSearchBar = searchSongSearchBar.value(forKey: "searchField") as? UITextField {
					placeholderInsidesearchSongSearchBar.textColor = UIColor.flint
					placeholderInsidesearchSongSearchBar.font = UIFont.textStyle
					placeholderInsidesearchSongSearchBar.textAlignment = .left 
		}
	}
}	
```

{% endtab %}

{% tab title="Android" %}

```markup
<!--activitySongList.xml-->
<SearchView
	android:id="@+id/songSearchView"
	android:layout_width="0dp"
	android:layout_height="wrap_content"
	android:iconifiedByDefault="false"
	android:queryBackground="@android:color/transparent"
	android:queryHint="@string/search"
	android:textAlignment="textStart"
	android:textColor="?attr/flint"
	android:layout_marginStart="20dp"
	android:layout_marginEnd="19dp"
	android:layout_marginBottom="8dp"
	app:layout_constraintStart_toStartOf="parent"
	app:layout_constraintEnd_toEndOf="parent"
	app:layout_constraintTop_toBottomOf="@+id/descriptionTextView"
	app:layout_constraintBottom_toTopOf="@+id/itemBackgroundView"/>
```

{% endtab %}
{% endtabs %}


# Convert to Lists and Grids

Convert to List and Grid design to iOS/Android code.

## Use Lists and Grids to Enrich User Experience

If you need to display scrolling elements dynamically, you should check if they are lists or [grids](/v1-mac-app/working-with-monday-hero/component-convert-to-ios-android-code/list-grid-design-to-ios-android-code/grid-design-to-ios-android-code). Lists are vertical, and grids can be vertical or horizontal. In lists, only 1 cell can be in a column but for Grids, it can be more than 1 cell in a column. Here is an example of both of them:

![Lists and Grids](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MKpDF6Xgwb_Z7dwqXur%2F-MKpE6OolHScNdfLNTPX%2Flists%20and%20grids.png?alt=media\&token=b789979e-27f8-43d8-88a7-a80c1792cec9)

Once you decide what you want to create, you can click the links below.&#x20;

* [Lists](/v1-mac-app/working-with-monday-hero/component-convert-to-ios-android-code/list-grid-design-to-ios-android-code/list-design-to-ios-android-code)
* [Grids](/v1-mac-app/working-with-monday-hero/component-convert-to-ios-android-code/list-grid-design-to-ios-android-code/grid-design-to-ios-android-code)


# Convert to List

Convert the List design to iOS/Android code.

## List to Swift/Android code

If you need to display scrolling elements dynamically, you should check if they are lists or [grids](/v1-mac-app/working-with-monday-hero/component-convert-to-ios-android-code/list-grid-design-to-ios-android-code/grid-design-to-ios-android-code). You can find [how to understand the difference here](/v1-mac-app/working-with-monday-hero/component-convert-to-ios-android-code/list-grid-design-to-ios-android-code). If you have decided that you want to create lists, this is right please to read.

An example of a list is below. In the image, the cell prototype repeats itself with different data inside.&#x20;

![List Example](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MK4FNPN4a5GVgCFl6Pw%2F-MK4Ga0SHdZYpS9275Su%2F29-newview2.png?alt=media\&token=c00857a0-2104-4e1f-9fc1-f1712a615014)

Lists are called different names in iOS and Android. They are explained below with the code and details.&#x20;

### Generated code for iOS/Android and Details

{% tabs %}
{% tab title="iOS" %}

## TableView

Lists are called in`TableView` Swift language. With `TableView`, you can view a group that aligns all children in a single direction. In`TableView`, no matter how wide they are, the vertical list has only one child per row, and your list will only be the one-row height(Height of the tallest child + padding).

`CellPrototype`wraps a layout and will often be the container used in a layout for each item within a `TableView`. Let's check the generated code.

TableView is added to the page's View Controller file.&#x20;

{% code title="ListPageViewController.swift " %}

```swift
import UIKit

class ListPageViewController: UIViewController {

//Connection from an Interface Builder to a UI component
@IBOutlet private weak var explorePostsTableView: UITableView!

	override func viewDidLoad() {
		super.viewDidLoad()
		setupViews()
	}
}

extension ListPageViewController {
	private func setupViews() {
	
		//TableView properties
		self.explorePostsTableView.rowHeight = UITableView.automaticDimension
		self.explorePostsTableView.estimatedRowHeight = 30
		self.explorePostsTableView.dataSource = self	

	}
	
}		

// MARK: - Table View DataSource

extension ListPageViewController: UITableViewDataSource {
	func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
		return 1
	}

	func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
		let cell = tableView.dequeueReusableCell(withIdentifier: "ExplorePostTableViewCell") as! ExplorePostTableViewCell
		return cell
	}
}
```

{% endcode %}

The Cell is added as a separate file.&#x20;

{% code title="ExplorePostsTableViewCell.swift" %}

```swift

import UIKit
import SnapKit

class ExplorePost: UITableViewCell {
	
	// MARK: - Properties
	@IBOutlet private weak var photoImageView2: UIImageView!
	@IBOutlet private weak var rosieDelLabel: UILabel!
	@IBOutlet private weak var likesLabel: UILabel!
	@IBOutlet private weak var heartLikedImageView: UIImageView!

	override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
		super.init(style: style, reuseIdentifier: reuseIdentifier)
		self.setupViews()
	}

	required init?(coder aDecoder: NSCoder) {
		super.init(coder: aDecoder)
	}

	func setupViews() {
		
		rosieDelLabel.text = NSLocalizedString("rosie.del", comment: "")
		rosieDelLabel.textColor = UIColor.porpoise
		rosieDelLabel.numberOfLines = 0
		rosieDelLabel.font = UIFont.textStyle2
		rosieDelLabel.textAlignment = .left

		likesLabel.text = NSLocalizedString(".likes2", comment: "")
		likesLabel.textColor = UIColor.anchor2
		likesLabel.numberOfLines = 0
		likesLabel.font = UIFont.textStyle6
		likesLabel.textAlignment = .right

	}
}
```

{% endcode %}
{% endtab %}

{% tab title="Android" %}

## RecyclerView-LinearLayoutManager

In Android lists are used with `RecyclerView`and`LinearLayout`. The repetitive cells are `CardView`&#x20;

With `LinearLayout`, you can view a group that aligns all children in a single direction. In`LinearLayout`, no matter how wide they are, the vertical list has only one child per row, and your list will only be the one-row height(Height of the tallest child + padding).

![Android RecyclerView and CardView](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MHFANrCOC6gc2K7q24z%2F-MHFQG7NhUfspOqdnQSq%2Fimage.png?alt=media\&token=157242b8-3443-40ce-9101-1ac3ff968014)

`CardView` wraps a layout and will often be the container used in a layout for each item within a `RecyclerView`. Let's check the generated code.

```markup
<!--activityListPage.xml-->
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/explorePicturesRecyclerView"
android:layout_width="0dp"
android:layout_height="0dp"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
tools:listitem="@layout/layout_explore_post_card_view"
android:layout_marginStart="20dp"
android:layout_marginEnd="19dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/popularTextView"
app:layout_constraintBottom_toBottomOf="parent"/>
```

```markup
<!--LayoutExplorePhotoCardView.xml-->
<androidx.cardview.widget.CardView
	xmlns:android="http://schemas.android.com/apk/res/android"
	xmlns:app="http://schemas.android.com/apk/res-auto"
	xmlns:tools="http://schemas.android.com/tools"
	android:layout_width="match_parent"
	android:layout_height="wrap_content">
	
	<androidx.constraintlayout.widget.ConstraintLayout
	android:layout_width="match_parent"
	android:layout_height="wrap_content">
	
	<ImageView
	android:id="@+id/photoImageView"
	android:layout_width="0dp"
	android:layout_height="wrap_content"
	android:src="@drawable/photo"
	android:scaleType="centerCrop"
	android:layout_marginEnd="0dp"
	android:layout_marginBottom="13dp"
	app:layout_constraintStart_toStartOf="parent"
	app:layout_constraintEnd_toEndOf="parent"
	app:layout_constraintTop_toTopOf="parent"
	app:layout_constraintBottom_toTopOf="@+id/rosieDelTextView"/>
	
	<TextView
	android:id="@+id/rosieDelTextView"
	android:layout_width="0dp"
	android:layout_height="wrap_content"
	android:text="@string/rosie_del"
	style="@style/textStyle2"
	android:textAlignment="textStart"
	android:textColor="?attr/porpoise"
	android:layout_marginEnd="8dp"
	app:layout_constraintStart_toStartOf="parent"
	app:layout_constraintEnd_toStartOf="@+id/likesTextView"
	app:layout_constraintTop_toBottomOf="@+id/photoImageView"
	app:layout_constraintBottom_toBottomOf="parent"/>
	
	<TextView
	android:id="@+id/likesTextView"
	android:layout_width="wrap_content"
	android:layout_height="wrap_content"
	android:text="@string/_likes"
	style="@style/textStyle6"
	android:textAlignment="textEnd"
	android:textColor="?attr/anchor2"
	android:layout_marginEnd="8dp"
	android:layout_marginTop="13dp"
	app:layout_constraintStart_toEndOf="@+id/rosieDelTextView"
	app:layout_constraintEnd_toStartOf="@+id/heartLikedImageView"
	app:layout_constraintTop_toBottomOf="@+id/photoImageView"
	app:layout_constraintBottom_toBottomOf="parent"/>
	
	<ImageView
	android:id="@+id/heartLikedImageView"
	android:layout_width="wrap_content"
	android:layout_height="wrap_content"
	android:src="@drawable/heartliked"
	android:layout_marginTop="14dp"
	android:layout_marginBottom="1dp"
	app:layout_constraintStart_toEndOf="@+id/likesTextView"
	app:layout_constraintEnd_toEndOf="parent"
	app:layout_constraintTop_toBottomOf="@+id/photoImageView"
	app:layout_constraintBottom_toBottomOf="parent"/>
	
	</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.cardview.widget.CardView>
```

{% endtab %}
{% endtabs %}


# Convert to Grid

Convert the Grid design to iOS/Android code.

## Grid to Swift/Android code

If you need to display scrolling elements dynamically, you should check if they are [lists](/v1-mac-app/working-with-monday-hero/component-convert-to-ios-android-code/list-grid-design-to-ios-android-code/list-design-to-ios-android-code) or grids. You can find [how to understand the difference here](/v1-mac-app/working-with-monday-hero/component-convert-to-ios-android-code/list-grid-design-to-ios-android-code). If you have decided that you want to create Grids, this is right please to read.

An example of a grid is below. In the image, the cell prototype repeats itself with different data inside.&#x20;

![](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MKpiCsd9a5WV-sXNlL4%2F-MKpk-F_dLM_rKdOHkAj%2FGroup%203.png?alt=media\&token=07fd63cd-5bd9-4ea5-bce9-4854352ee778)

&#x20;

Grids have different names in iOS and Android. Grids are explained below with the code and details.

### Generated code for iOS/Android and Details

{% tabs %}
{% tab title="iOS" %}

## CollectionView (Horizontal / Vertical)&#x20;

A grid is called `CollectionView` in Swift language.

A CollectionView object is responsible for managing an ordered collection of data items and presenting them in customizable layouts.

It has two directions as **Vertical** and **Horizontal**. You can select the one that fits your case. In the case below, you can see the CollectionView-Vertical and its generated code.

![](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MGrIvvQkqS1zsILEfc7%2F-MGsUYUQcgIKaef_BBCI%2Fcollection.gif?alt=media\&token=9e10239d-4c92-464b-b24b-35ec43e42c98)

{% code title="ProfilePage.swift" %}

```swift
import UIKit

class ProfilePage: UIViewController {
	
//Connection from an Interface Builder to a UI component
@IBOutlet private weak var userPhotosCollectionView: UICollectionView!

		override func viewDidLoad() {
			super.viewDidLoad()
			setupViews()
	}

	private func setupViews() {
		userPhotosCollectionView.backgroundColor = UIColor.clear
		self.userPhotosCollectionView.dataSource = self
		}
}

// MARK: - Collection View DataSource

extension ProfilePage: UICollectionViewDataSource {
	func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int{
		return 10
	}

	func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell{
        
		let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "PictureCollectionViewCell", for: indexPath) as! PictureCollectionViewCell
		return cell
	}
}
```

{% endcode %}

The cell is defined in a separate file.

{% code title="PictureCollectionViewCell.swift" %}

```swift
import UIKit

class PictureCollectionViewCell: UICollectionViewCell {
	
	// MARK: - Properties

	@IBOutlet private weak var pic03ImageView: UIImageView!

    
	override init(frame: CGRect) {
		super.init(frame: frame)
		self.setupViews()
	}

	required init?(coder aDecoder: NSCoder) {
		super.init(coder: aDecoder)
	}

	func setupViews() {
		//The properties of the code are defined in Storyboard. 
	}
}
```

{% endcode %}
{% endtab %}

{% tab title="Android" %}

## RecyclerView-GridLayoutManager

`GridLayoutManager` is the `RecyclerView.LayoutManager` implementation that shows items in a grid. It is responsible for managing an ordered collection of data items and presenting them in customizable layouts.

It has two directions as **Vertical** and **Horizontal**. You can select the one that fits your case. In the case below, you can see the GridLayoutManager-Vertical and its generated code.

![](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MHFANrCOC6gc2K7q24z%2F-MHFWG4XSYcqtuCWjoZz%2Fimage.png?alt=media\&token=3424f664-58a6-40f3-bbd1-07940b0e3372)

Let's see the generated code for `GridLayoutManager`.

```markup
<!--activityProfilePage.xml-->
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/userPicturesRecyclerView"
android:layout_width="0dp"
android:layout_height="0dp"
android:background="@drawable/userpicturesrecyclerview_background_drawable"
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
tools:listitem="@layout/layout_user_picture_card_view"
app:spanCount="3"
android:orientation="vertical"
android:layout_marginStart="20dp"
android:layout_marginEnd="20dp"
android:layout_marginBottom="1dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/photosTextView"
app:layout_constraintBottom_toTopOf="@+id/profileIconImageView"/>
```

The card is defined in a separate file.

```markup
<!--layoutUserPictureCardView.xml-->
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">
	
<ImageView
android:id="@+id/pic03ImageView"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:src="@drawable/pic04"
android:scaleType="centerCrop"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"/>
	
</androidx.constraintlayout.widget.ConstraintLayout>

```

{% endtab %}
{% endtabs %}


# Export Code

Convert Adobe XD/Sketch design to code. Export the generated UI code as iOS/Android code and run in both Android Studio/Xcode.

## Export Code and Support Native iOS/Android&#x20;

### Download Code & Assets

The code can be downloaded as **a screen** or **a whole project** depending on the need. It is possible to get it as an Xcode/Android Studio Project.

To export the code, follow these steps:

### Step 1: Click the **Export** Button

![A ready to export project, and the 'Export' button.](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MG8dLRY5FmW5kJ7DbmJ%2F-MG8ja4ruWJz2MeW4iGP%2F01-overall.png?alt=media\&token=09ee94da-5516-41f4-b1fc-8fe3bb98394a)

### Step 2: Select the Export Option and Directory

The dialog will appear and show the export options. Select one of the export options and click the "●●●" to change the directory that the project will be exported.

#### Screenshots from iOS/Android Projects

{% tabs %}
{% tab title="iOS Projects" %}
![Pop-up for iOS projects.](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MG8dLRY5FmW5kJ7DbmJ%2F-MG8v-_5Dy8MbyMz-CeP%2F03-exportOptions.png?alt=media\&token=21ed70cf-74df-47d5-9051-04622288625c)

The dependencies and requirements can be found on this pop-up, iOS projects require Xcode 10.0 or later. &#x20;
{% endtab %}

{% tab title="Android Projects" %}
![Pop-up for Android projects.](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MG8dLRY5FmW5kJ7DbmJ%2F-MG8wNC5fE9oAQQzHYmd%2F04-popupAndroid.png?alt=media\&token=9197c12c-cafb-4ceb-9361-48b208f326b1)

The dependencies and requirements can be found on this pop-up, Android projects require API Level 29 or later. &#x20;
{% endtab %}
{% endtabs %}

The code can be exported in 3 different scenarios. To see more details about the options and the exported files, click the link below that fits the needs.

[1- Export all screens as a new project.](/v1-mac-app/working-with-monday-hero/export-design-to-swift-android-code-monday-hero/export-design-to-xcode-android-studio-new-project)

[2- Export only selected screen as a new project.](/v1-mac-app/working-with-monday-hero/export-design-to-swift-android-code-monday-hero/export-selected-design-to-xcode-android-studio-new-project)

[3- Export only selected screen into an existing project.](/v1-mac-app/working-with-monday-hero/export-design-to-swift-android-code-monday-hero/export-design-to-xcode-android-studio-existing-project)

### Step 3: **Export**

Click **Export** to complete the steps.&#x20;

![Export Button](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MI-NbWu56TTM6ugd9x6%2F-MI2v_dlZdSep2m26hIc%2FGroup%2012%403x.png?alt=media\&token=d13bdc24-e5c6-4921-92ef-0ec71e68f006)

When the project has exported, the colors, fonts, assets, and UI layout code can be found in the project. To learn more about the downloaded files or read different exporting options, select an **Exporting Option** in [Step 2 above](/v1-mac-app/working-with-monday-hero/export-design-to-swift-android-code-monday-hero#step-2-select-the-export-option), or continue reading.

### Example of an Exported Project and Generated iOS/Android Code

Monday Hero exports an Xcode/Android Project with **colors**, **fonts**, **assets**, **string**, and **layout** files. Please note that there are no duplicate values in colors, fonts, and string files.

The results of the downloaded project are different for Android and iOS Projects.&#x20;

{% tabs %}
{% tab title="iOS" %}

#### Project Structure

Monday Hero downloads the project as iOS-Example.

![Exported iOS Project.](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MI2xyJG8veglh5TLdg8%2F-MI2yPxNS1ggNamdFP6g%2FScreen%20Shot%202020-09-25%20at%2009.35.38.png?alt=media\&token=75e1e380-047f-4705-b5a3-fadb375062ff)

**Storyboard File**\
\
The screens are downloaded as **Main.storyboard** file (Also it is possible to export only code, without Storyboard). Downloaded Storyboard file:

![Downloaded Storyboard file for entire project.](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MI-NbWu56TTM6ugd9x6%2F-MI2wc_eosFNV5_U8FB3%2FScreen%20Shot%202020-09-25%20at%2009.27.45.png?alt=media\&token=484a106d-66c2-4402-9b03-887b8ae1480d)

**Colors**\
The colors are downloaded as a single file and automatically named by Monday Hero in **Colors.swift** file. The colors' values are also not duplicated.

![Colors.swift file.](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MI-NbWu56TTM6ugd9x6%2F-MI2x-w9xBmUsL2UAFz2%2Fcolors.png?alt=media\&token=40ed2eb4-1219-44f6-a724-9d00f008cd27)

**Fonts**\
The fonts and their sizes are downloaded in one file as text styles and can be found/edited in the **Fonts.swift** file.

![Fonts.swift file.](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MIxiseiC4-6m86I0qv0%2F-MIxqXSzKICvkMIdn_OG%2Fimage.png?alt=media\&token=baf552c3-40fc-4ffc-9cfe-cdbb9e6f0da1)

**Strings**\
The strings are also exported in a single file for the whole project in Localizable.strings file.

![Localizable.strings file.](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MI-NbWu56TTM6ugd9x6%2F-MI2xLyoznt-WQzwaatC%2Fstrings.png?alt=media\&token=16bdcccd-481a-4737-abc1-7cfabcb02007)

**Assets**\
One of the most important exported files is assets. They are downloaded in 1x, 2x, and 3x densities. They are all ready to use and automatically sized. They can be found in Assets.xcassets folder.

![Asset folder and files in an exported project.](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MJ2L3HOQSx66xxI6zjY%2F-MJ2U8PGLhfAggbCg5bj%2FScreen%20Shot%202020-10-07%20at%2017.34.54.png?alt=media\&token=8c7744df-6937-4dbd-aa36-9536a04e0ad6)
{% endtab %}

{% tab title="Android" %}

#### Project Structure

Monday Hero downloads the project as AndroidExample.

![Exported Android Project.](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MG8xILPQSWeLu5BClo0%2F-MG94Pgb199ZozBUA9sC%2F07-android%20exported.png?alt=media\&token=3b4ddb37-ab8b-4a33-bdc9-d1e38c658227)

**Layouts**\
The layouts are ready as can be seen below.

![List page layout of Travel App in Android Studio.](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MG997vxjPdILyIIHPDK%2F-MG9AsGo57R1zzBOG-ba%2F13-Android-layou.png?alt=media\&token=91da2679-b2bd-4cde-800c-8058ae6a43e7)

**Colors**\
We can see the colors in **colors.xml** file. These colors are named automatically by Monday Hero.&#x20;

{% hint style="info" %}
Please note that there are no duplicated values in colors, fonts, and strings.
{% endhint %}

![Downloaded Colors in colors.xml](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MG997vxjPdILyIIHPDK%2F-MG9BswZrEG63fwpIs19%2F14-android%20colors.png?alt=media\&token=b5c91735-a794-471f-be19-95cf2c8e1a71)

**Strings**\
As we mentioned above, the strings are also exported. They are placed in the **strings.xml** file.&#x20;

![Downloaded Strings in strings.xml file](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MG997vxjPdILyIIHPDK%2F-MG9CJ_umMMaH_axnql4%2F15-android%20strings.png?alt=media\&token=5d1260d1-5e61-42b6-9055-914893b410f5)

**Fonts**\
Also, we gather the fonts and their sizes in one place as text styles and which can be found/edited in the **fonts.xml** file.

![Downloaded Text Styles in fonts.xml](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MG997vxjPdILyIIHPDK%2F-MG9CixAzyyIgLuR_T1c%2F16-%20android%20fonts.png?alt=media\&token=6bda1cc6-ef12-4737-9080-be25ae700170)

**Assets**\
And the last but not least, the assets. They are all ready to use and automatically sized in the **res** folder.
{% endtab %}
{% endtabs %}

As can be seen above, the project is ready to run. After these steps, the development takes place out of Monday Hero. With already exported project UI as an Xcode project or Android Studio project, and it is ready to work in a development environment. Now it is time to work on the backend services and configurations as planned. Happy coding!


# Export All Screens as a New Project

Convert Adobe XD/Sketch design to code, export the generated UI code as iOS/Android code, and run in both Android Studio/Xcode. Bring your idea to life in minutes.

## Export Code and Support Native iOS/Android

### Download Code & Assets

To export all of the screens in the Monday Hero project as a new Xcode/Android Studio Project, there are 3 easy steps.&#x20;

1. Click **Export Icon** and choose the path to export.&#x20;
2. Select **As a New Project** optio&#x6E;**.**
3. Click the **Export** button, and downloading will start.

![Export as a new project with all screens in Monday Hero.](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MG9FpCKmDQheM-5QynD%2F-MG9IQ2lhIw7i1v5bkEg%2F18-toplu%20export.png?alt=media\&token=bfcdb377-fcb7-4228-a499-56e1e367df6e)

The exporting progress bar will pop-up and a 'blink' sound will be heard when it's done. Open the directory that is exported, the project is there and ready to run.&#x20;

### Example of an Exported Project and Generated iOS/Android Code

Monday Hero exports an Xcode/Android Project with **colors**, **fonts**, **assets**, **string**, and **layout** files. Please note that there are no duplicate values in colors, fonts, and string files.

The results of the downloaded project are different for Android and iOS Projects.&#x20;

{% tabs %}
{% tab title="iOS" %}

#### Project Structure

Monday Hero downloads the project as iOS-Example.

![Exported iOS Project.](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MI2xyJG8veglh5TLdg8%2F-MI2yPxNS1ggNamdFP6g%2FScreen%20Shot%202020-09-25%20at%2009.35.38.png?alt=media\&token=75e1e380-047f-4705-b5a3-fadb375062ff)

**Storyboard File**\
\
The screens are downloaded as **Main.storyboard** file (Also it is possible to export only code, without Storyboard). Downloaded Storyboard file:

![Downloaded Storyboard file for entire project.](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MI-NbWu56TTM6ugd9x6%2F-MI2wc_eosFNV5_U8FB3%2FScreen%20Shot%202020-09-25%20at%2009.27.45.png?alt=media\&token=484a106d-66c2-4402-9b03-887b8ae1480d)

**Colors**\
The colors are downloaded as a single file and automatically named by Monday Hero in **Colors.swift** file. The color values are also not duplicated.

![Colors.swift file.](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MI-NbWu56TTM6ugd9x6%2F-MI2x-w9xBmUsL2UAFz2%2Fcolors.png?alt=media\&token=40ed2eb4-1219-44f6-a724-9d00f008cd27)

**Fonts**\
The fonts and their sizes are downloaded in one file as text styles and can be found/edited in the **Fonts.swift** file. The font values are also not duplicated.

![Fonts.swift file.](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MIxiseiC4-6m86I0qv0%2F-MIxqXSzKICvkMIdn_OG%2Fimage.png?alt=media\&token=baf552c3-40fc-4ffc-9cfe-cdbb9e6f0da1)

**Strings**\
The strings are also exported in a single file for the whole project in Localizable.strings file.

![Localizable.strings file.](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MI-NbWu56TTM6ugd9x6%2F-MI2xLyoznt-WQzwaatC%2Fstrings.png?alt=media\&token=16bdcccd-481a-4737-abc1-7cfabcb02007)

**Assets**\
One of the most important exported files is assets. They are downloaded in 1x, 2x, and 3x densities. They are all ready to use and automatically sized. They can be found in Assets.xcassets folder.

![Asset folder and files in an exported project.](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MJCm0rVEoQ8QjJQOsoh%2F-MJDkeMdZAWO4OFfgxk0%2F1_Fg6QEJi3cThOw5F4WDrZIA.png?alt=media\&token=6350c8d6-bf93-40fb-8b84-34793f757657)
{% endtab %}

{% tab title="Android" %}

#### Project Structure

Monday Hero downloads the project as AndroidExample.

![Exported Android Project.](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MG8xILPQSWeLu5BClo0%2F-MG94Pgb199ZozBUA9sC%2F07-android%20exported.png?alt=media\&token=3b4ddb37-ab8b-4a33-bdc9-d1e38c658227)

**Layouts**\
The layouts are ready as can be seen below.

![List page layout of Travel App in Android Studio.](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MG997vxjPdILyIIHPDK%2F-MG9AsGo57R1zzBOG-ba%2F13-Android-layou.png?alt=media\&token=91da2679-b2bd-4cde-800c-8058ae6a43e7)

**Colors**\
We can see the colors in **colors.xml** file. These colors are named automatically by Monday Hero.&#x20;

{% hint style="info" %}
Please note that there are no duplicated values in colors, fonts, and strings.
{% endhint %}

![Downloaded Colors in colors.xml](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MG997vxjPdILyIIHPDK%2F-MG9BswZrEG63fwpIs19%2F14-android%20colors.png?alt=media\&token=b5c91735-a794-471f-be19-95cf2c8e1a71)

**Strings**\
As we mentioned above, the strings are also exported. They are placed in the **strings.xml** file.&#x20;

![Downloaded Strings in strings.xml file](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MG997vxjPdILyIIHPDK%2F-MG9CJ_umMMaH_axnql4%2F15-android%20strings.png?alt=media\&token=5d1260d1-5e61-42b6-9055-914893b410f5)

**Fonts**\
Also, we gather the fonts and their sizes in one place as text styles and which can be found/edited in the **fonts.xml** file.

![Downloaded Text Styles in fonts.xml](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MG997vxjPdILyIIHPDK%2F-MG9CixAzyyIgLuR_T1c%2F16-%20android%20fonts.png?alt=media\&token=6bda1cc6-ef12-4737-9080-be25ae700170)

**Assets**\
And the last but not least, the assets. They are all ready to use and automatically sized in the **res** folder. The images are downloaded in mdpi, hdpi, xhdpi, xxhdpi and xxxhdpi densities.&#x20;

![Asset folder and files in an exported project.](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MJCkEaeXUGm0p-BrjWV%2F-MJCkNK9ZX6dimyW1ziL%2F17-android%20assets%202.png?alt=media\&token=d009096e-c2e2-4317-bdfb-1b1b38ec7da3)
{% endtab %}
{% endtabs %}

As can be seen above, the project is ready to run. After these steps, the development takes place out of Monday Hero. With already exported project UI as an Xcode project or Android Studio project, and it is ready for development. Now it is time to work on the backend services and configurations as planned. Happy coding!


# Export Only Selected Screen as a New Project

Convert Adobe XD/Sketch design to code, export the generated UI code for a specific screen as iOS/Android code, and run in both Android Studio/Xcode.

## Export Code and Support Native iOS/Android

### Download Code & Assets

Be sure that the screen that will be exported is open, and click the **Export > As a New Project > Only Selected Screen** and click **Export**, and downloading will be started.

![Exporting the selected screen as a new project.](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MG9FpCKmDQheM-5QynD%2F-MGCFWte24N3N4ErZLC-%2F19-%20export%20only%20selected%20as%20a%20new.png?alt=media\&token=6177f237-ad24-4af0-bf8c-f014a3449e10)

The exporting progress bar will pop-up and a 'blink' sound will be heard when it's done. Open the directory that is exported, the project is there and ready to run.&#x20;

### Example of an Exported Project and Generated iOS/Android Code

Monday Hero exports an Xcode/Android Project with **colors**, **fonts**, **assets**, **string**, and **layout** files. Please note that there are no duplicate values in colors, fonts, and string files.

The results of the downloaded project are different for Android and iOS Projects.&#x20;

{% tabs %}
{% tab title="iOS" %}

#### Project Structure

Monday Hero downloads the project as iOS-Example.

![Exported iOS Project.](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MI2xyJG8veglh5TLdg8%2F-MI2yPxNS1ggNamdFP6g%2FScreen%20Shot%202020-09-25%20at%2009.35.38.png?alt=media\&token=75e1e380-047f-4705-b5a3-fadb375062ff)

**Storyboard File**\
The screen is downloaded as **Main.storyboard** file (Also it is possible to export only code, without Storyboard). Downloaded Storyboard file:

![One screen exported from Monday Hero and runs successfully.](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MG9FpCKmDQheM-5QynD%2F-MGCHM1FJ5L90LCUfi16%2FScreen%20Shot%202020-09-02%20at%2008.28.09.png?alt=media\&token=35aeff7c-ef04-4c39-a6c7-0be01e4c5eb8)

**Colors**\
The colors are downloaded as a single file and automatically named by Monday Hero in **Colors.swift** file. The color values are also not duplicated.

![Colors.swift file.](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MI-NbWu56TTM6ugd9x6%2F-MI2x-w9xBmUsL2UAFz2%2Fcolors.png?alt=media\&token=40ed2eb4-1219-44f6-a724-9d00f008cd27)

**Fonts**\
The fonts and their sizes are downloaded in one file as text styles and can be found/edited in  **Fonts.swift** file. The font values are also not duplicated.

![Fonts.swift file.](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MIxiseiC4-6m86I0qv0%2F-MIxqXSzKICvkMIdn_OG%2Fimage.png?alt=media\&token=baf552c3-40fc-4ffc-9cfe-cdbb9e6f0da1)

**Strings**\
The strings are also exported in a single file for the whole project in **Localizable.strings** file.&#x20;

![Localizable.strings file.](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MI-NbWu56TTM6ugd9x6%2F-MI2xLyoznt-WQzwaatC%2Fstrings.png?alt=media\&token=16bdcccd-481a-4737-abc1-7cfabcb02007)

**Assets**\
One of the most important exported files is assets. They are downloaded in 1x, 2x, and 3x densities. They are all ready to use and automatically sized. They can be found in **Assets.xcassets** folder.

![Asset folder and files in an exported project](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MJCm0rVEoQ8QjJQOsoh%2F-MJDkeMdZAWO4OFfgxk0%2F1_Fg6QEJi3cThOw5F4WDrZIA.png?alt=media\&token=6350c8d6-bf93-40fb-8b84-34793f757657)
{% endtab %}

{% tab title="Android" %}

#### Project Structure

Monday Hero downloads the project as AndroidExample.

![Exported Android Project.](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MG8xILPQSWeLu5BClo0%2F-MG94Pgb199ZozBUA9sC%2F07-android%20exported.png?alt=media\&token=3b4ddb37-ab8b-4a33-bdc9-d1e38c658227)

**Layouts**\
The layout is ready as can be seen below.<br>

![List page layout of Travel App in Android Studio.](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MJ5t-F22YTEwxqoeQzj%2F-MJ5wjQF7vOKicmEOFNM%2FAdobe-Background-Extra%403x.png?alt=media\&token=4217c7c1-d45d-493f-8afd-1e2b01f48e52)

**Colors**\
We can see the colors in **colors.xml** file. These colors are named automatically by Monday Hero. The color values are also not duplicated.

![Downloaded Colors in colors.xml](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MG997vxjPdILyIIHPDK%2F-MG9BswZrEG63fwpIs19%2F14-android%20colors.png?alt=media\&token=b5c91735-a794-471f-be19-95cf2c8e1a71)

**Fonts**\
Also, we gather the fonts and their sizes in one place as text styles and which can be found/edited in the **fonts.xml** file. The font values are also not duplicated.

![Downloaded Text Styles in fonts.xml](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MG997vxjPdILyIIHPDK%2F-MG9CixAzyyIgLuR_T1c%2F16-%20android%20fonts.png?alt=media\&token=6bda1cc6-ef12-4737-9080-be25ae700170)

**Strings**\
As we mentioned above, the strings are also exported. They are placed in the **strings.xml** file.&#x20;

![Downloaded Strings in strings.xml file](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MG997vxjPdILyIIHPDK%2F-MG9CJ_umMMaH_axnql4%2F15-android%20strings.png?alt=media\&token=5d1260d1-5e61-42b6-9055-914893b410f5)

**Assets**\
And the last but not least, the assets. They are all ready to use and automatically sized in the **res** folder. The images are downloaded in mdpi, hdpi, xhdpi, xxhdpi and xxxhdpi densities.&#x20;

![Asset folder and files in an exported project](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MJCkEaeXUGm0p-BrjWV%2F-MJCkNK9ZX6dimyW1ziL%2F17-android%20assets%202.png?alt=media\&token=d009096e-c2e2-4317-bdfb-1b1b38ec7da3)
{% endtab %}
{% endtabs %}

As can be seen above, the project is ready to run and after this step, development takes place out of Monday Hero. With already exported the project UI as an Xcode project or Android Studio project, and it is ready for development. Now it is time to work on the backend services and configurations as planned. Happy coding!


# Export Only Selected Screen Into an Existing Project

Convert the changes in Adobe XD/Sketch design to code, export the generated new UI code as iOS/Android code, add new changes that are ready to run in both Android Studio/Xcode.

## Had a design review and now doing the same changes in the project files again? Not with Monday Hero.

You can import the changed pages, convert the changed components, and export the new changes directly into an existing project with Monday Hero.

### Download Code & Assets

Be sure that the screen that will be exported is open, and click the **Export > Into Existing Project** as it can be seen below.

{% tabs %}
{% tab title="iOS" %}
Choose the path that the screen will be exported and be sure that it has **.xcassets** folder. Click **Export,** and downloading will be started.

![Exporting into an iOS project.](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MG9FpCKmDQheM-5QynD%2F-MGC2oNw_HsMkpYwxTCd%2F24-export-existing-iOS.png?alt=media\&token=e743e8cd-f893-4a80-9eaf-fcde0d50a28e)

{% hint style="warning" %}
It is not possible to export if the path doesn't have the **.xcassets** folder. A warning pop-up that says 'Please choose a folder that has xcassets file.' will appear.
{% endhint %}

The exporting progress bar will pop-up and a 'blink' sound will be heard when it's done. Open the directory that is exported, the project is there. It will automatically download **Colors.swift, Fonts.swift, assets**, and **the** **code of the selected screen**. The code changes on depending on your preferences, you can either download with Storyboard file or only as code.

{% hint style="warning" %}
The Storyboard file will be downloaded as **main.Storyboard**. Be sure that the Storyboard file name is different in the existing project before downloading the new screen to **avoid** **overwriting**.
{% endhint %}

Let's add the new files to the project by following the next 2 steps below in Xcode.&#x20;

![](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MI2yiPVcm5vDocDrXhg%2F-MI2zWgxL2ECiPn3lMuw%2F01.png?alt=media\&token=48c353fe-55c6-48d2-86ed-86775aa0133d)

**Step 1**: Open the project, **right-click** to the project folder and select **'Add Files To \[nameOfTheProject]'**&#x20;

![](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MI2yiPVcm5vDocDrXhg%2F-MI2zbM9SUlyMu34LHk0%2F02.png?alt=media\&token=83b4e909-d29e-4c3e-b46c-73a0760299d2)

**Step 2**: Click the new files that are only in the main folder.  No need to go for the base/assets folder. And click **Add.**

![](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MI2yiPVcm5vDocDrXhg%2F-MI2zpezsJSCTvzVjZiy%2F03.png?alt=media\&token=10bb5405-918b-459a-9e21-21beaef3db51)

All done. All selected files are added to the project as can be seen below.

![](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MI2yiPVcm5vDocDrXhg%2F-MI3--75XwyG9BQ2ZtGo%2F04.png?alt=media\&token=435e98be-f380-41e1-8b07-a6ee68078b15)

The new screen is ready to run/edit it in the project.
{% endtab %}

{% tab title="Android(WIP)" %}
🚧  This page will be ready soon for you.
{% endtab %}
{% endtabs %}

A working project example can be seen below. All the files are created and located.

### Example of an Exported Project and Generated iOS/Android Code

{% tabs %}
{% tab title="iOS" %}
**Storyboard File**\
\
The screens are downloaded as **Main.storyboard** file (Also it is possible to export only code, without Storyboard). Downloaded Storyboard file:

![Downloaded Storyboard file for entire project.](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MI-NbWu56TTM6ugd9x6%2F-MI2wc_eosFNV5_U8FB3%2FScreen%20Shot%202020-09-25%20at%2009.27.45.png?alt=media\&token=484a106d-66c2-4402-9b03-887b8ae1480d)

**Colors**\
The colors are downloaded as a single file and automatically named by Monday Hero in **Colors.swift** file. The colors' values are also not duplicated.

![Colors.swift file.](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MI-NbWu56TTM6ugd9x6%2F-MI2x-w9xBmUsL2UAFz2%2Fcolors.png?alt=media\&token=40ed2eb4-1219-44f6-a724-9d00f008cd27)

**Fonts**\
The fonts and their sizes are downloaded in one file as text styles and can be found/edited in the **Fonts.swift** file.

![Fonts.swift file.](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MIxiseiC4-6m86I0qv0%2F-MIxqXSzKICvkMIdn_OG%2Fimage.png?alt=media\&token=baf552c3-40fc-4ffc-9cfe-cdbb9e6f0da1)

**Strings**\
The strings are also exported in a single file for the whole project in Localizable.strings file.

![Localizable.strings file.](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MI-NbWu56TTM6ugd9x6%2F-MI2xLyoznt-WQzwaatC%2Fstrings.png?alt=media\&token=16bdcccd-481a-4737-abc1-7cfabcb02007)

**Assets**\
One of the most important exported files is assets. They are downloaded in 1x, 2x, and 3x densities. They are all ready to use and automatically sized. They can be found in Assets.xcassets folder.

![Asset folder and files in an exported project.](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MJCm0rVEoQ8QjJQOsoh%2F-MJDkeMdZAWO4OFfgxk0%2F1_Fg6QEJi3cThOw5F4WDrZIA.png?alt=media\&token=6350c8d6-bf93-40fb-8b84-34793f757657)
{% endtab %}

{% tab title="Android" %}
**Layouts**\
The layouts are ready as can be seen below.

![List page layout of Travel App in Android Studio.](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MG997vxjPdILyIIHPDK%2F-MG9AsGo57R1zzBOG-ba%2F13-Android-layou.png?alt=media\&token=91da2679-b2bd-4cde-800c-8058ae6a43e7)

**Colors**\
We can see the colors in **colors.xml** file. These colors are named automatically by Monday Hero.&#x20;

{% hint style="info" %}
Please note that there are no duplicated values in colors, fonts, and strings.
{% endhint %}

![Downloaded Colors in colors.xml](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MG997vxjPdILyIIHPDK%2F-MG9BswZrEG63fwpIs19%2F14-android%20colors.png?alt=media\&token=b5c91735-a794-471f-be19-95cf2c8e1a71)

**Strings**\
As we mentioned above, the strings are also exported. They are placed in the **strings.xml** file.&#x20;

![Downloaded Strings in strings.xml file](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MG997vxjPdILyIIHPDK%2F-MG9CJ_umMMaH_axnql4%2F15-android%20strings.png?alt=media\&token=5d1260d1-5e61-42b6-9055-914893b410f5)

**Fonts**\
Also, we gather the fonts and their sizes in one place as text styles and which can be found/edited in the **fonts.xml** file.

![Downloaded Text Styles in fonts.xml](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MG997vxjPdILyIIHPDK%2F-MG9CixAzyyIgLuR_T1c%2F16-%20android%20fonts.png?alt=media\&token=6bda1cc6-ef12-4737-9080-be25ae700170)

**Assets**\
And the last but not least, the assets. They are all ready to use and automatically sized in the **res** folder.The images are downloaded in mdpi, hdpi, xhdpi, xxhdpi and, xxxhdpi densities.&#x20;

![Android Image Assets](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MJCkEaeXUGm0p-BrjWV%2F-MJCkNK9ZX6dimyW1ziL%2F17-android%20assets%202.png?alt=media\&token=d009096e-c2e2-4317-bdfb-1b1b38ec7da3)
{% endtab %}
{% endtabs %}

As can be seen above, the project is ready to run. After these steps, the development takes place out of Monday Hero. With already exported project UI as an Xcode project or Android Studio project, and it is ready for development. Now it is time to work on the backend services and configurations as planned. Happy coding!


# 🚧 Configure Code Preferences (WIP)

Configure code preferences for iOS/Android and maintain your/team's code standards.

Sorry! This document is in progress.\
\
But here is a tip for you below, since you discovered this page. 😉

## Topic: Get the best fit for your already agreed/existing codebase.

Let's go back to reading!

{% content-ref url="/pages/-MGCPjz01m6Pk6QnMWQe" %}
[Workflow Basics](/v1-mac-app/workflow-for-design-to-code)
{% endcontent-ref %}


# Travel App

Build and run the Travel App in both iOS & Android. The source code and designs are available in Sketch and Adobe XD, also free to use.

## Travel App Tutorial iOS code and Sketch/Adobe XD design included.

In this tutorial, a travel app that's shown below will be created with Monday Hero App.

![Travel app pages, supported for both iOS and Android.](https://2355570332-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MIT8ZubYubvi04MoG9K%2F-MITAxeqrjtnqYX6d2sM%2Fpreview.png?alt=media\&token=4dbd5158-43f7-4707-bd91-65e981eb3328)

In this app, users can share the pictures that they take, have a timeline and profile page like Instagram. Depending on your experience and the drafts that you have, building an app UI like this one, **takes hours to days**. We will build this app from scratch, with no codebase. With this tutorial, you can do it **less than half an hour**. This tutorial is published on Monday Hero blog, you can reach the link below.&#x20;

{% embed url="<https://medium.com/monday-hero/showcase-1-building-an-instagram-like-travel-app-ios-tutorial-dc978daf11a9>" %}

If you are a new user of Monday Hero, [click here for getting started with the installation.](/v1-mac-app/getting-started/install-app-and-plugin) You can read information from the sign up to create the first project.&#x20;


# Overview

Learn how to quickly convert designs into code with Monday Hero.

## What is Monday Hero?

Monday Hero converts designs into iOS and Android code for developers and designers. This allows product teams to avoid dealing with basic coding for UI, fonts, colors, and assets. It's best for saving time by removing repetitive manual work in the UI and focus on the functionality/creativity more.

Use it to convert Sketch App, Adobe XD, and Figma designs into iOS and Android UI code(Swift and Flutter).&#x20;

Below is a 6-minute video on how to use Monday Hero's Mac App. In this tutorial, you can learn how to:

1. Upload designs to Monday Hero,
2. Create components like buttons, text fields, and lists,&#x20;
3. Export code and launch on a mobile device.&#x20;

{% embed url="<https://www.youtube.com/watch?v=1Zi2C9Tcrdk>" %}
How to use Monday Hero
{% endembed %}

Monday Hero automatically understands the images, texts, and views in the design. Select the elements and convert them to components/widgets, buttons, text boxes, lists, or grids... Then, copy the code to use it immediately, and download assets, and all necessary elements.

### What are the key benefits?

#### Speed up your workflow ⚡️

Save up to 30 percent of the total project time on UI tasks that are already well-prepared by a designer.&#x20;

#### Bring your designs into life **🎨**

Easily achieve the correct color, font, and pixel for every item, bringing your designs to life effortlessly.

#### **Meet the demands on time ⏳**

Allocate more time to focus on functionality, coding, and testing.

**Get ready-to-run UI and project files 💻**

Export the user-interface design as fully-working code complete with assets.

**Remove conflicts and misunderstandings 🗣**

Enhance designer-developer collaboration

### What are the most important features of the design to code with Monday Hero?

Our functions that teams love:

* Convert layers to native iOS components or Flutter components,
* **Exporting the source code, assets, fonts, colors, and UI** for iOS via plugins and working independently,
* UI (**Storyboard) support**,
* Responsive UI to **support all screen sizes**,
* Exporting the design as a new project / into an existing project / only selected screens,
* Working in an **all-in-one place** with the team,

… and many more.


# Workflow Basics

Workflow basics that most developers and designers use while converting the Sketch / Adobe XD design to iOS / Android native code with Monday Hero.

## Design to Code Workflow for Developers and Designers

Most users and teams follow this workflow while using Monday Hero. Although not mandatory, this guide provides a smoother approach to leveraging Monday Hero effectively.

\
This workflow includes 3 phases:

1. The first phase covers the **design**, and the user-interface needs to be prepared in either Sketch or Adobe XD.&#x20;
2. The second phase is about how you **develop** your project. In this phase, you can edit the generated code by defining the interactions (like buttons, text views, and lists...) of the layers/views. &#x20;
3. Then, you can export your project and pass on the last phase, the **Edit & Review**. In this phase, you will have your ready-to-run project UI. You can do your **edits** and continue to develop your project in your favorite IDE.&#x20;

It is always possible to have some changes in UI while working with designers/customers. When you got reviews and changes, it is possible to keep up with them easily by following the flow from [**Phase 1: Design**](/workflow-for-design-to-code#phase-1-design) till [**Phase 3: Edit & Review**](/workflow-for-design-to-code#phase-3-edit-and-review) again. You can generate and add changes to your existing project.

&#x20;

![A designated workflow in Monday Hero](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MQvqXYr3wwS9gGJ_Ya4%2F-MQvrBsPX1AYcI30eHwR%2Fv5-%20Workflow%20-%20Flow%20Chart.png?alt=media\&token=93d9660f-deaa-4020-8c2b-2ad881a1e813)

### Phase 1: Design&#x20;

As we mentioned above, the design file needs to be prepared in either Sketch or Adobe XD. After you finish your design, you should check whether your design file is ready to share with a developer. This is one of the key points to get the most accurate export from Monday Hero.

In the design phase, you have two steps to follow after you complete your design:

#### Step 1: Check The Design File&#x20;

In the design file, all icons, background images, and logos that will be used in the artboards must be exportable and grouped, so that they can be used easily. Also, mockup rectangles or designs should be removed from the design file.&#x20;

You can read more about [how to check the design file and avoid possible mistakes here.](/getting-started/design-handoff-to-ios-android-developer)

![A Common Mistake Example](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MGhr4acZv4N9uwxBmm1%2F-MGhvrw4RAeExa7iiH03%2FGroup%202.png?alt=media\&token=8275a3d6-9773-474f-a788-e1d3b21a404f)

#### Step 2: Import Designs into Monday Hero

After reviewing the design file and making the final touches, you are ready to export via plugins. Select the artboard/s that you want to work on, and export it/them by using [Monday Hero Plugin](/getting-started/import-design-files-into-monday-hero/import-adobe-xd-design-files-into-monday-hero) in your current design tool. \
\
Learn more about [how to import a design file into Monday Hero.](/getting-started/import-design-files-into-monday-hero/import-adobe-xd-design-files-into-monday-hero)

![Export Designs to Monday Hero](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MGhr4acZv4N9uwxBmm1%2F-MGhwY9LdCs4gPNnhhL6%2FExport.png?alt=media\&token=0312818d-7643-460e-91e8-516a052cbcce)

### Phase 2: Develop

#### Step 1: Converting Layers / Views Into Components&#x20;

When you import a design, Monday Hero automatically understands images, texts, and views in the design. In this step, **it expects you to define the interactions of the layers/views**. You can select the layers and define them as buttons, text inputs, lists, or any other components that you want to use, in that particular scenario.

You can create the components with a couple of clicks, and you will see the generated code immediately.

Learn more about [how to convert layers to components here.](broken://pages/-Mc0XVEGVWyIZxV8eO59)

![Converting Layers into Components](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MRPbFMRmm2tXLR40A4Z%2F-MRUJFfwyPKSuoKhzgt8%2FCreate-button-new-19-compressed.gif?alt=media\&token=584ea30a-ddfe-4f6c-a440-41fa89f896ab)

#### Step 2: Export Code as Swift/ Kotlin & XML Code

There are two ways to get ready-to-run code out of Monday Hero: exporting a single screen or whole project. You can export them as a new project, or you can export your changes into your existing project.

* **Exporting Screen:** If you want to export just a single screen, it will give you all the required code and assets to add to your existing project. It helps you to handle last-minute changes. <br>
* **Exporting Project:** If you are working on a new app and didn't export before, this is the best to export the entire project. You will get a ready-to-run project code with all screens that you prepared.

Depends on the project that Read and learn more about[ how to export code here.](broken://pages/-MFFw3MYGAKSVIALcEBU)

![Exporting Code in Mac Desktop App](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MHudJpYDgvnYV_AjQx6%2F-MHufvB1Dv_2ajCPsxly%2FnewProject.png?alt=media\&token=464e2093-e9ec-47d0-b17e-d0e6cc7a18e2)

### Phase 3: Edit & Review&#x20;

This phase takes place out of Monday Hero. You already exported your project UI source-code and assets as an Xcode project or Android Studio project, and it is ready for development. You can build your project, work on the backend services and configurations as you wish.

{% hint style="info" %}
When you have some changes in UI, it is possible to keep up with them easily by following the flow from [**Phase 1: Design**](/workflow-for-design-to-code#phase-1-design) till [**Phase 3: Edit & Review**](/workflow-for-design-to-code#phase-3-edit-and-review) again. You can generate and add changes to your existing project. Then, you can work in your development environment.
{% endhint %}

#### What's Next?

Let's get to work! You can [download](/getting-started/install-app-and-plugin) and[ create your first project on Monday Hero](/getting-started/login-create-project-in-monday-hero).


# Installing the Desktop App

Install the Monday Hero Desktop App to import Sketch/Adobe XD files into Monday Hero and export code to your local environment.

## How to Install Monday Hero Desktop App

You can use Monday Hero without downloading the desktop app by visiting [app.mondayhero.io](https://app.mondayhero.io/login). You may app.mondayhero.io. However, you may need the desktop app to import design files into Monday Hero.

Setting up Monday Hero takes just a few clicks. It is available for both Windows and Mac. The steps are explained below:

### Installing the Mac App

1- Select your operating system (macOS) and download the app from [the Downloads page](https://mondayhero.io/download).&#x20;

![Downloading Mac App](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MaXGk2wOdjGxeyRjY_c%2F-MaXIGaAJ_dWeswevDCS%2FScreen%20Shot%202021-05-25%20at%2009.46.51.png?alt=media\&token=9431f633-3334-4fbe-94c6-992bc2c768eb)

2 - The Monday-Hero.dmg file will be downloaded. Double-click it to open and then drag the Monday Hero icon to the Applications folder to complete the installation.

![Monday Hero Installation](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MaXGk2wOdjGxeyRjY_c%2F-MaXKMHydPVEC2tvyqdQ%2FScreen%20Shot%202021-05-25%20at%2010.02.11.png?alt=media\&token=d930499b-d47b-49cf-a578-a72e48c59647)

{% hint style="info" %}
Monday Hero is compatible with macOS High Sierra (10.13.4) and Sketch 52/Adobe XD 13 or higher.
{% endhint %}

3- If you plan to upload designs from **Sketch App**, also install the Monday Hero Uploader. It can be downloaded from [the Downloads page](https://mondayhero.io/download).&#x20;

![Sketch Plugin and Monday Hero Uploader](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MV31PdoVKA5aisBDYUQ%2F-MV32MsxlYtIc7dIxV7b%2FGroup%2035.png?alt=media\&token=27a24778-a786-4a93-a3f9-0669536be80a)

That's it. You can log in with your account and password if you have already registered with Monday Hero; otherwise, please sign up.

### Installing the Windows App

1- Select your operating system (Windows) and download the app on [the Downloads page](https://mondayhero.io/download).&#x20;

![Windows App](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MaXGk2wOdjGxeyRjY_c%2F-MaXIJwaWMdx-Xjh_ey_%2FScreen%20Shot%202021-05-25%20at%2009.46.57.png?alt=media\&token=0dd18f82-188b-4460-a4f9-017df188f90b)

2 - The Monday-Hero-Setup.exe file will be downloaded. Double-click it to start the installation. Once the installation is complete, the process is finished.

That's it. You can log in with your account and password if you have already registered with Monday Hero; otherwise, please sign up.

{% hint style="info" %}
Monday Hero is compatible with Windows 7 and higher. Min 4GB RAM, Graphic card with support for WebGL.
{% endhint %}

### Download Sketch Plugin

If your designs are created in Sketch App, you will need the Sketch plugin to import them into Monday Hero. It can be downloaded from [the downloads page](https://mondayhero.io/download). Please note that the plugin will be automatically installed when you install the Monday Hero Uploader App.

![Sketch Plugin and Monday Hero Uploader](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MV31PdoVKA5aisBDYUQ%2F-MV32MsxlYtIc7dIxV7b%2FGroup%2035.png?alt=media\&token=27a24778-a786-4a93-a3f9-0669536be80a)

### Download Adobe XD Plugin

If your designs are created in  Adobe XD, you will need the Adobe XD plugin to import them into Monday Hero. When the Monday Hero app is opened, it will prompt you to install it with a pop-up. If you cannot see this pop-up or find the plugin under '**Plugins > Monday Hero**' in  Adobe XD, you can manually download it from [the downloads page](https://mondayhero.io/download) and double-click to install it in seconds.

![Just download and double-click to install Adobe XD Plugin.](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MIYTH04MK1AufQ0Fcdl%2F-MIYVKXfDK0Z0v-0OwbN%2FScreen%20Shot%202020-10-01%20at%2012.32.16.png?alt=media\&token=24bfb467-0053-4bfc-a3cc-ebd6f36221e8)

### Install Figma Plugin

If your designs are created in Figma, you will need the Figma plugin to import them into Monday Hero. Detailed instructions for downloading and installing the plugin are available on a separate page dedicated to this topic. For more information and to install the plugin, please go to our [import Figma designs into Monday Hero page](/getting-started/import-design-files-into-monday-hero/import-figma-design-files-into-monday-hero).

That's it! You're all set. [Log in and start creating your first project ](/getting-started/login-create-project-in-monday-hero)on Monday Hero now!


# Log In & Create a Project

Log in to Monday Hero and Create an iOS/Android Project.

## The first step of Design to Code&#x20;

A project in Monday Hero contains everything you need to create the UI for your app, from designs to layout code, components, chats with Hero Assistant, assets, colors, and fonts. Monday Hero automatically converts the designs uploaded into mobile code. This page provides a summary of how to log in and create your first project.

### Log in to Monday Hero

When you launch the app, you will see the login pop-up shown below. You can easily sign in to Monday Hero using the email and password you created during [the sign-up ](https://app.mondayhero.io/signup)process.

<div data-full-width="false"><figure><img src="https://479678609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEfkN8oSQyQ4BaBzwxH-4037006485%2Fuploads%2FlOhKIZ1JkxT6926Owjd8%2FScreenshot%202024-04-28%20at%2017.29.26.png?alt=media&amp;token=40e5b237-704a-4478-96ec-93068aa12f74" alt=""><figcaption><p>Log in to Monday Hero.</p></figcaption></figure></div>

{% hint style="info" %}
If you have login issues, you can reset your password by clicking the 'Forgot Password' button. Enter the email address you used to register with Monday Hero on the 'Forgot Password' page, and you will receive an email to reset your password.
{% endhint %}

### Create an iOS Project

When you log in successfully, you will see the projects page. On this page, you can create a new project and view your existing projects. To create your first project, click the '**Create New Project**' button and select a project type. Available project types are Swift (iOS) and Flutter for both iOS and Android. To complete the creation of your first project, enter a project name and click the '**Create**' button as shown below.

<figure><img src="https://479678609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEfkN8oSQyQ4BaBzwxH-4037006485%2Fuploads%2FDvIKVEwCktfHnWIDUVgU%2FScreenshot%202024-04-28%20at%2017.30.45.png?alt=media&amp;token=21e746ba-85e7-48da-8d73-ea917b25839d" alt=""><figcaption><p>No Project Screen</p></figcaption></figure>

<figure><img src="https://479678609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEfkN8oSQyQ4BaBzwxH-4037006485%2Fuploads%2FvzAkezOICNrjVlCEPmsc%2FScreenshot%202024-04-28%20at%2017.30.54.png?alt=media&amp;token=986a12b7-9d6b-4d0d-89e8-73d8e37348b3" alt=""><figcaption><p>Create a New Project Screen</p></figcaption></figure>

Congratulations! You have successfully created your first project. To import your screens, follow the instructions [here](/getting-started/import-design-files-into-monday-hero). If there are no designs in your project yet, you will see this page:

<figure><img src="https://479678609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEfkN8oSQyQ4BaBzwxH-4037006485%2Fuploads%2FCYdMAlf7PU1aN5TqxFa4%2FScreenshot%202024-04-28%20at%2017.33.13.png?alt=media&amp;token=353686a3-b876-44d9-8437-e54a988c79b1" alt=""><figcaption><p>Add Design to Your Project</p></figcaption></figure>

To continue, [**import your design**](/getting-started/import-design-files-into-monday-hero) and/or [**invite your teammate/designer**](/getting-started/manage-team-developer-designer-role#invite-your-team-members-to-monday-hero) to your project.


# Prepare Design to Get the Best Code Results

Use this guide to check whether your Figma, Adobe XD, or Sketch design file is ready for handoff to the developer on Monday Hero.

It is crucial to properly prepare your designs in Figma, Adobe XD, or Sketch to ensure the best code outcomes in Monday Hero. The preparation process is straightforward and takes only a few minutes. It involves steps such as removing duplicate and unnecessary layers or objects, grouping images, and setting them to be exportable so that Monday Hero can upload image assets.&#x20;

You can either watch the video below or continue reading to learn how to prepare your design for optimal results in Monday Hero.

{% embed url="<https://youtu.be/MTsHAUhoNZM>" %}
Design Handoff Essentials
{% endembed %}

When handing off designs to developers using other hand-off tools, it's important to make images exportable so they can be downloaded as complete images or icons. The same rule applies here: if you don't make images exportable, they will be treated as empty and won't be uploaded as needed to Monday Hero.

This document covers tips, do's, and don'ts. Let's examine some use cases one by one.

{% hint style="warning" %}
It's essential to make **only images** (or any elements you want the Monday Hero app to treat as images in the code) exportable. There is no need to make **texts**, **rectangles**, or **ovals** exportable. When you set images as exportable, they will be added to the assets folder in your code as images.
{% endhint %}

### 1. Make icons/images exportable &#x20;

Locate all the images and icons on the page and set them to be exportable so they can be imported into Monday Hero as images. Before setting them as exportable, ensure they are either a single layer or are correctly grouped as one image. **In the case of groups, ensure that the parent group layer is exportable.**

How to make exportable:&#x20;

1. Select the icon/image/group from the left side (layers menu),
2. Click the 'make exportable' button on the right side.

Once you click the 'make exportable' button, you will also see how it will be exported in Monday Hero.

{% tabs %}
{% tab title="Sketch" %}
![The preview of another icon that made exportable.](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MI3KKZ_n4Xj6Ekfjggp%2F-MI3PWZtLmB5jj7bCI42%2Fsketchicon02.png?alt=media\&token=02b8b23a-cd82-4a6d-91bf-4039bb5d93fe)
{% endtab %}

{% tab title="Adobe XD" %}
![The preview of another icon that made exportable.](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MI3KKZ_n4Xj6Ekfjggp%2F-MI3SNnjWe-vQE5mlXq1%2FAdobe-Made%20Exportable.png?alt=media\&token=1473f07d-cc3f-46d3-9180-8b226d3cc4cd)
{% endtab %}
{% endtabs %}

Here are some use cases:&#x20;

* **Logo:** Generally, logos consist of multiple layers, not just one. Therefore, you need to group all paths, lines, and texts in the logo together and make the entire group exportable. This prevents each component from being treated and placed as a separate image, which could result in an incorrect appearance. Grouping and marking them as exportable ensures that all paths and lines are combined and exported as a single, seamless image.

{% tabs %}
{% tab title="Sketch" %}
![Example of a design with many pathes.](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MJ1Ni2zBMQ0HB2nrG3I%2F-MJ1oGABhMABlkNDtyzL%2Fsketch-logo.png?alt=media\&token=e54e3392-f721-4ba4-990e-6c4b9937e4a1)
{% endtab %}

{% tab title="Adobe XD" %}
![Example of a design with many pathes.](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MJ1ylw_T1rhBP1c9ND9%2F-MJ2Ktx457gYaBSTFYn-%2Fadobe-icon-export.png?alt=media\&token=365412fb-1d8a-42f3-8f01-5961af4e82a1)
{% endtab %}
{% endtabs %}

* **Icon:** Icons typically consist of paths and lines, but they should be treated as a single image in the code. Therefore, please group all components of the icon and make the entire group exportable.

{% tabs %}
{% tab title="Sketch" %}
![Grouped and exportable paths in Sketch.](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MIIRg0BFa3HkZ3PByJT%2F-MIJnJgvje9uMZTURoMW%2Fexportable.png?alt=media\&token=eeb77130-f301-40ba-b85d-607970b15b58)
{% endtab %}

{% tab title="Adobe XD" %}
![Grouped and exportable paths in Adobe XD.](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MIIRg0BFa3HkZ3PByJT%2F-MIJtqjyuzsp4wvKiZV3%2Fexportable.png?alt=media\&token=7017e757-77b2-4931-b253-0c5924bacf48)
{% endtab %}
{% endtabs %}

* **Background Image:** Sometimes, the background image of the screens is sliced, as shown below. In such cases, group the image slices and mark the entire group as exportable. By making the background exportable, it should appear as a single, cohesive image.

{% tabs %}
{% tab title="Sketch" %}
![How to make a group exportable in Sketch.](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MGiAmf8KjGxpi3QcclP%2F-MGiDjqFbUadZ87PgYH0%2Fimage.png?alt=media\&token=24cb2e31-efc7-4515-a06a-66682645868a)

Select the background items, right-click to choose '**Group Selection**' from the menu, and then make the group exportable.

![The expected result from grouping and making the group exportable.](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MGiAmf8KjGxpi3QcclP%2F-MGiDomKV0d1eTtWShXN%2Fimage.png?alt=media\&token=10a5ad28-bb74-4b58-b305-8f08116294b0)
{% endtab %}

{% tab title="Adobe XD" %}
![Grouping the background items](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MIIRg0BFa3HkZ3PByJT%2F-MIJeDaG-K3SchgC7eCC%2Fgrupla.png?alt=media\&token=36707650-32c0-4548-9ab3-7ac5defd1c69)

Select the background items and **Group** them by selecting **Group Selection** in the right-click menu and make the group exportable.

![How to make a group exportable in Adobe XD.](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MIIRg0BFa3HkZ3PByJT%2F-MIJfCiWKJo2yqJzsDjE%2Fexport.png?alt=media\&token=573c1853-73ac-4a91-af93-579577da90dd)
{% endtab %}
{% endtabs %}

* **Background Image with a Colored Layer:** Typically, the background should consist of a single image or a grouped exportable image. However, additional layers might be added on top of the background to enhance its appearance. To prepare this type of background for development, depending on your specific case, you should group, merge, or mask these layers, and then mark them as exportable. This will ensure the background is ready to be used as one cohesive image.

![Example of using gradient in a rectangle to make the design look better.](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MIIRg0BFa3HkZ3PByJT%2F-MIJxt5gAeoVSGtiZF4h%2Fbackgg.png?alt=media\&token=1451b904-dec1-43ad-a285-68077f660378)

### 2. Remove Mockups&#x20;

Adding mockups (such as device curves) to your designs means that Monday Hero will also generate code for these mockups. However, including mockup images in the code is not advisable. Therefore, please remove any mockups and retain only the elements that are essential for the app.

![Mockup rectangle/designs should be removed.](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MGiAmf8KjGxpi3QcclP%2F-MGiEUiMVr_PeNTWLSHo%2Fimage.png?alt=media\&token=449a79c7-ef10-41c1-b09e-dbcb1bc6d3eb)

### 3. Remove the guiding objects

Designers often use various techniques to achieve pixel-perfect designs, including using rectangles, vectors, lines, or other shapes for alignment and measurement purposes. Before exporting the screens, ensure that these guiding objects or layers are removed from the design.

![The lines or shapes that used for perfect design should be removed.](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MGiAmf8KjGxpi3QcclP%2F-MGiEcxKCCdHwAiPxZc6%2Fimage.png?alt=media\&token=981917af-3e06-416f-bc90-a2705d963dd3)

### 4. Use the Rectangle tool to draw Rectangles, not the Path/Pencil tool

Rectangles are commonly used as backgrounds or containers in the code. While the path and pencil tools can also draw rectangles, it's important to use the Rectangle tool for consistency. The outcome may appear the same in the design, but using the Rectangle tool ensures proper code generation in Monday Hero.

When you draw a **rectangle** using **the Rectangle tool**, Monday Hero interprets it as a view/background/container code. However, if you use the path/pencil tool, the same rectangle will result in an image code instead.

It's acceptable to use the path and pencil tools for drawing icons and other images.

<figure><img src="https://479678609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEfkN8oSQyQ4BaBzwxH-4037006485%2Fuploads%2FWjeE67B17lIDCLWQ0S1s%2FRectangle.png?alt=media&amp;token=3dd0429f-2e1c-464c-8f0c-3af363917235" alt=""><figcaption><p>Drawing a rectangle</p></figcaption></figure>

That's it! You're all set. Now you can [import your design to Monday Hero](/getting-started/import-design-files-into-monday-hero)!


# Import Design Files into Monday Hero

In Monday Hero, use templates or upload your own design files to turn designs into code. Select your favorite tool to continue:

{% content-ref url="/pages/-MbL1Z1K-E0PCv9sjT-V" %}
[Import Figma Design Files into Monday Hero](/getting-started/import-design-files-into-monday-hero/import-figma-design-files-into-monday-hero)
{% endcontent-ref %}

{% content-ref url="/pages/-MF5fvpP85LyqAtUgN-C" %}
[Import Adobe XD Design Files into Monday Hero](/getting-started/import-design-files-into-monday-hero/import-adobe-xd-design-files-into-monday-hero)
{% endcontent-ref %}

{% content-ref url="/pages/-MV349aI4FJA0NMrJA-X" %}
[Import Sketch Design Files Into Monday Hero](/getting-started/import-design-files-into-monday-hero/import-sketch-design-files-into-monday-hero)
{% endcontent-ref %}

![Convert Designs to Code](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MV3AGgvZclmCKkJlvK-%2F-MV3AggdynBgLM3r_GOb%2FthumbnailImage.png?alt=media\&token=9b21b599-903f-46c2-a922-e15f038c43b7)


# Import Figma Design Files into Monday Hero

Import Figma design files to Monday Hero to get iOS/Android code.

The first step in creating your app with Monday Hero is to import your designs. You can do this directly from your favorite tool. Either watch the video below or continue reading to learn how to easily import designs into Monday Hero.

{% embed url="<https://www.youtube.com/watch?v=-N_8lL8DY3I>" %}
Import Designs from Figma to Monday Hero
{% endembed %}

The Monday Hero web app and plugin provide everything you need to start importing designs.

### Install Figma Plugin

1. Click [here ](https://www.figma.com/community/plugin/976479062173362312/Monday-Hero)to install the Monday Hero Plugin for Figma. On the Monday Hero Figma Community Page, simply click '**Install**'.

![Monday Hero Plugin](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MbtwF-mmVi2pARLEwxK%2F-Mbu0hG6ytkldYpmTj-x%2FGroup%20176.png?alt=media\&token=6190ea74-0bcc-4f8c-8517-37a7fda89b9b)

Once installed, the '**Installed**' button will appear on the right side of the page.

![Monday Hero Plugin Installation](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MbtwF-mmVi2pARLEwxK%2F-Mbu1q7_EbTTnS5uUsPL%2FGroup%20177.png?alt=media\&token=43365361-12c8-41ab-a74b-6e82208468e4)

That's it! The plugin is now ready for use.

### Import Figma Design to Monday Hero

1. Once the Figma plugin is installed, navigate to the design you wish to upload. Then, go to the 'Plugins' menu and select 'Monday Hero'.

![](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-Mbu9JHe8AaAM5XjGPav%2F-MbuH8DvgV_3lAnahP1I%2FGroup%20181.png?alt=media\&token=eed3e2e2-3192-4269-81d8-549467396c3b)

2. In the plugin, click the 'Login' button. This will automatically direct you to the Monday Hero login page. Enter your email and password to continue. Please note that if you're already logged in, it's not necessary to enter your email and password again. You can proceed to the next step.

![Monday Hero Plugin Login Page](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MbuHxUvdMSFtMm1C5Yy%2F-MbuZQYWOlMYM9DoYfOy%2FGroup%20190.png?alt=media\&token=278f1f0e-cff2-481c-81a3-dc5682f0d491)

![Monday Hero Web App Login Page](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MbuHxUvdMSFtMm1C5Yy%2F-MbuXLVD3dmCPIy4GgjI%2FGroup%20182.png?alt=media\&token=03c5d512-d425-44ac-a318-d50a98b9bbc6)

3. On the next page, grant Monday Hero read access to your Figma files.

![Allowing access](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MbuHxUvdMSFtMm1C5Yy%2F-MbuZgtPcABdCMD9gpp6%2FGroup%20191.png?alt=media\&token=6d70858d-347e-4e25-8ad2-0970784093f3)

4. Once access is granted, your Figma account will automatically connect to your Monday Hero account. Close this tab and return to Figma.

![Connected to Figma](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MbuHxUvdMSFtMm1C5Yy%2F-Mbu_044qNx4j5AdcSSo%2FGroup%20185.png?alt=media\&token=4b92e572-5c0d-4932-ad2e-88732138704f)

5. Access has been granted for the account. Now it's time to give access to the specific Figma design file you need to use. The Figma File URL will be necessary for this step.

![](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-Mbu_HyYVLvoRm3FbUhL%2F-Mbu_dLnUM-Hi4zA-JoO%2FGroup%20186.png?alt=media\&token=12d8b95f-181a-40a5-a24d-f1c7d62d788e)

Click the '**Share**' button in Figma, copy the link, and paste it into the Figma File URL area.

![Getting Figma File URL](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-Mbu_HyYVLvoRm3FbUhL%2F-MbucP9K6WXOqPcRFfdg%2FGroup%20192.png?alt=media\&token=2f4db240-be1b-4199-b029-dc09246521a0)

Paste the link into the Monday Hero Plugin and click the '**Next**' button.

6. The plugin is now ready to use! Select the screens you wish to export and click the '**Export**' button.

![](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MbudAfcbZM_747nlkFl%2F-MbuenqZ7-0ecOYy9oy0%2FGroup%20194.png?alt=media\&token=c339ee20-0f9c-442f-b1e5-899ae1ce4ec9)

7\. In the Monday Hero web app, select your project and click the '**Import to Project**' button

![](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MbuercHhVk9nh_8XK_y%2F-Mbuf6ejF4RPHiVnp3LC%2FGroup%20193.png?alt=media\&token=c0191d6c-4136-4ee7-89ac-03c5d4504bd3)

When the import is complete, you can view the status in the notifications bar:

![Notification Bar](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MbuercHhVk9nh_8XK_y%2F-MbufO6t8CqxSLmoVGh_%2FGroup%20179.png?alt=media\&token=05901df8-cd40-4a1f-a988-d03017fe11e0)

Congrats! It's done. You can continue to work on components on the screens individually or [share them with your team](/getting-started/manage-team-developer-designer-role).


# Import Your Figma Text Style and Color Library

Import your design library to Monday Hero

To import your predefined Text Style and Color Library from Figma to Monday Hero, first publish the library. Once it is published, upload your screens, and you will be able to use the color names and text styles from the Figma file. Here’s how to do it:

Here is how to do it:&#x20;

1. Click the Figma logo and then the '**Libraries**' button."

![Figma Library Menu](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEfkN8oSQyQ4BaBzwxH-4037006485%2Fuploads%2FD1QLWLBW6BUw4AkvY6GU%2Ffirst.png?alt=media\&token=4866f6b1-1daa-4452-ae6c-434427253de4)

2. Click the '**Publish**' button next to your current file name.

<figure><img src="https://479678609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEfkN8oSQyQ4BaBzwxH-4037006485%2Fuploads%2FWXG4yqeUTqeNtFZ3admx%2Fsecond.png?alt=media&amp;token=80e8af23-435c-47c5-b48a-59d22c528c83" alt=""><figcaption><p>Figma - Publish Library</p></figcaption></figure>

3. '**Publish styles only**' should be sufficient to transfer your styles to Monday Hero. Choose either 'Publish styles only' or 'Upgrade to Professional' depending on your preference.&#x20;

<figure><img src="https://479678609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEfkN8oSQyQ4BaBzwxH-4037006485%2Fuploads%2FzwBiajzYGK9NsTk3MRMC%2Fthird.png?alt=media&amp;token=ae22f63f-8a5c-4ee9-8f4c-e9f9cc198af6" alt=""><figcaption><p>Figma Publish Style</p></figcaption></figure>

4. Click the 'Publish styles' button, and you’re ready to go.

<figure><img src="https://479678609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEfkN8oSQyQ4BaBzwxH-4037006485%2Fuploads%2FfnAj7lJ4CpRdO3fW2Xbs%2Fforth.png?alt=media&amp;token=6772a93f-94a5-4583-acf0-0c760bf55a61" alt=""><figcaption></figcaption></figure>

Once you publish the styles and upload your screens, you will be able to view your text styles under the 'Theme' tab in your Monday Hero project. Congratulations!


# Import Adobe XD Design Files into Monday Hero

Import Adobe XD design files to Monday Hero to get iOS/Android code.

The first step in creating your app with Monday Hero is to import your designs. You can do this directly from your favorite tool. Either watch the video below or continue reading to learn how to easily import designs into Monday Hero.

{% embed url="<https://youtu.be/wehF3PY83Ms>" %}
How to import designs from Adobe XD to Monday Hero
{% endembed %}

You'll need the Monday Hero desktop app  to import your design file. If you don't already have it, download the desktop app [here](https://mondayhero.io/download). Follow the steps below to download the plugins and import your design:

1. Click [here](https://xd.adobelanding.com/en/xd-plugin-download/?pluginId=5f721909) to install the Monday Hero Plugin for Adobe XD.

![Monday Hero Plugin for Adobe XD link](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MV2pOxAGWk1rxLfGO7K%2F-MV2wEZYgN7-xNRfrIJ_%2FGroup%2032.png?alt=media\&token=2a74d118-8f08-4402-b7ac-dbcdcdb3ebd7)

![Adobe XD Plugin Installation](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MV2pOxAGWk1rxLfGO7K%2F-MV2wOb897dAfabWTp1k%2FGroup%2033.png?alt=media\&token=30bbf3df-6259-4553-a320-01ba0e46cde6)

2\. Once the installation is complete, you will find the Monday Hero Plugin under the '**Plugins**' menu. Ensure that the Monday Hero desktop app is open.

3\. Select the artboards you wish to import and click the '**Export Selected Artboard(s)**' button.&#x20;

![Exporting designs from Adobe XD via Monday Hero Plugin.](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MIK7EgdXPf0b0MGzEDJ%2F-MIK8Fb8Md_cq8V1aNbJ%2FScreen%20Shot%202020-09-28%20at%2017.36.46.png?alt=media\&token=9633c03d-1655-402f-a7f6-0941e1558f0e)

&#x20;4\. As the final step, choose the project and click '**Import**'.

![My Projects Screen](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MV2zEc18Se7WgI1ZQmR%2F-MV3-FgXwOq_2KBDMc_0%2FGroup%2034.png?alt=media\&token=ffdc918a-6dac-4f2d-9236-ab55884736e7)

You will see a loading window as the selected artboards are analyzed and uploaded to your project. Once the process is complete, the imported screens will be visible in your project.

![Monday Hero - Screens: Uploaded screens under Project Screens window.](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MQvxov_loSc4mRgLkfV%2F-MQw3FPQRiHR6COTRU7e%2FProject-Screens.png?alt=media\&token=cd83135b-61eb-4d4d-9912-e85485ccae97)

Congrats! It's done. You can continue to work on components on the screens individually or [share them with your team](/getting-started/manage-team-developer-designer-role).


# Import Sketch Design Files Into Monday Hero

Import Sketch design files to Monday Hero to get iOS/Android code.

The first step in creating your app with Monday Hero is to import your designs. You can do this directly from your favorite tool. Either watch the video below or continue reading to learn how to easily import designs into Monday Hero.

{% embed url="<https://www.youtube.com/watch?v=o2euY4vDr8w>" %}
How to import a design from Sketch App to Monday Hero
{% endembed %}

For importing your Sketch design files to Monday Hero, you'll need the Monday Hero Uploader, as shown below. Once the designs are uploaded, you can utilize all the functionality of the new Monday Hero Desktop App as usual.

![Download Sketch Plugin and Legacy Monday Hero App](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MV31PdoVKA5aisBDYUQ%2F-MV32MsxlYtIc7dIxV7b%2FGroup%2035.png?alt=media\&token=27a24778-a786-4a93-a3f9-0669536be80a)

1. The Sketch Plugin is automatically installed with the app. If you do not see it under the 'Plugins' menu in the Sketch App, double-click to install it in seconds.
2. Select the artboards you want to import and click the '**Export Selected Artboard(s)**' button."

![Exporting designs from Sketch via Monday Hero Plugin.](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MGi65jd_HPR07_RpMnM%2F-MGi6frEFLw5Fb9z7p88%2Fimage.png?alt=media\&token=efe7ee6c-1b68-46bb-bc41-86c19d2a04fd)

3. As the final step, select the project and click '**Import**'.

![My Projects Screen](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MV2zEc18Se7WgI1ZQmR%2F-MV3-FgXwOq_2KBDMc_0%2FGroup%2034.png?alt=media\&token=ffdc918a-6dac-4f2d-9236-ab55884736e7)

A loading window will appear as the selected artboards are analyzed and uploaded to Monday Hero. Once the process is complete, you will find the imported screens in your project.

![Monday Hero - Screens: Uploaded screens under Project Screens window.](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MQvxov_loSc4mRgLkfV%2F-MQw3FPQRiHR6COTRU7e%2FProject-Screens.png?alt=media\&token=cd83135b-61eb-4d4d-9912-e85485ccae97)

Congrats! It's done. You can continue to work on components on the screens individually or [share them with your team](/getting-started/manage-team-developer-designer-role).


# Share Your Project & Manage Roles

Share your project with your team members

On Monday Hero, you can collaborate as a project team. Share the design and work on the same codebase to enhance project efficiency. This page outlines information about member types and how to manage your project team.

The owner of the project is the user who created it. Only the project owner has the authority to manage member settings. Every project can include an unlimited number of designers, while the number of developers is limited and varies according to your subscription plan. You can upgrade your plan to increase the number of seats as needed. If the available plans do not fit your team's needs, please [contact us](mailto:support@mondayhero.io?cc=nazli@mondayhero.io\&subject=The%20current%20Monday%20Hero%20plans%20are%20not%20suitable%20for%20our%20team\&body=Company%20name%3A%0D%0ACompany%20size%3A%0D%0ANumber%20of%20designers%20we%20need%3A%0D%0ANumber%20of%20developers%20we%20need%3A).

### Member Settings

Working as a team is essential when creating an app. Follow the steps below to access the Member Settings menu and manage your team:

1. Hover your mouse cursor over your project to reveal the Settings icon. Click on the Settings icon and select 'Member Settings' to view the project members.

![Open the Member Settings of a Project.](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MQvVibWNZtPlfnhLSuN%2F-MQv__LhudPsCLs3WQRC%2Fproject-member-settings-marked-2x.png?alt=media\&token=8aa8a964-1284-4c49-88d3-ebfe62e065a3)

### Invite Members to Your Project

In [**Member Settings,**](/getting-started/manage-team-developer-designer-role#manage-your-team) enter the email address, select the role, and click the 'Send Invite' button. Monday Hero will automatically send an email invitation to the new user to join the project. If they have not already signed up, once they do and join, they will have access to the project.&#x20;

That's it! You've successfully invited your teammate.

![Invite a Member](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MQvVibWNZtPlfnhLSuN%2F-MQvopi2bn0lDw1x9K4A%2Finvite-a-member-to-project-2x-small.png?alt=media\&token=d4f87822-47af-4252-9579-f0f50e529f36)

### Remove Members From Your Project

In [**Member Settings,**](/getting-started/manage-team-developer-designer-role#manage-your-team) click the 'See More' icon, represented by '...', next to the user you want to remove, and then click 'Remove.' Once a member is removed, they will no longer have access to the project. You can re-invite any removed members to your project if needed.

![Remove a Member](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MQvVibWNZtPlfnhLSuN%2F-MQvq6oPFcaiPMbYzYaT%2Fremove-a-member.png?alt=media\&token=5d9ba0c2-bfdf-404c-a0dd-f698de27852e)


# Convert Design to Flutter

Create your iOS and Android App with Monday Hero

You can now easily convert Figma, Adobe XD, and Sketch designs into Flutter code to build natively compiled apps for both iOS and Android from a single codebase.&#x20;

Join the Flutter community on our Discord. If you find a bug or have any suggestions, please contact us on our [Discord community](http://bit.ly/HeroesInDiscord).

### How to Get Flutter Code?&#x20;

1. [Log in](/getting-started/login-create-project-in-monday-hero) to your Monday Hero account.
2. [Create a Flutter project](/getting-started/login-create-project-in-monday-hero).
3. [Upload](/getting-started/import-design-files-into-monday-hero) designs to your project. Please make sure the designs are revised to[ get the best code results](/getting-started/design-handoff-to-ios-android-developer) on Monday Hero.
4. Create [your Flutter components](/design-to-flutter/creating-components) like Buttons, Lists, and more.
5. [Make your code responsive](/design-to-flutter/create-responsive-code) by clicking the 'Make layout responsive' button, or add your responsive components on Monday Hero.
6. Preview the code on Monday Hero or[ sync it ](/design-to-flutter/sync-code)to your project.

{% hint style="info" %}
If you don't have a design, we have a demo at Figma Community prepared for you. [Click here to view](https://www.figma.com/community/file/1052567636946646090) and start discovering the app.
{% endhint %}

Here is a complete Flutter App Tutorial:

{% embed url="<https://youtu.be/Fb5AaJFyohE?si=eBacrav_zEn-eKjP>" %}
Complete Flutter App Tutorial
{% endembed %}

![Monday Hero Flutter support is live!](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEfkN8oSQyQ4BaBzwxH-4037006485%2Fuploads%2FSE31tyTmsggjiwasjYCb%2Fimage%206.png?alt=media\&token=ab0e0213-9d94-4078-962d-f8d1afbd1dc3)


# Create Flutter Components

Create components like buttons, text fields, lists, grids, and much more...

Monday Hero is designed to automatically recognize the images, texts, and views in your design. However, to develop a fully functioning app, essential components such as buttons and text fields must be manually created. This document guides you through creating components on Monday Hero to achieve a fully operational app.

### Types of Components

In Monday Hero, there are two main types of components: System Components and Custom Components.

* [**System Components:**](/design-to-flutter/creating-components/system-components) These are predefined components provided by the development language, such as a Material Button.
* [**Custom Components:**](/design-to-flutter/creating-components/custom-components) These are components that you create using system components. For example, a custom component might be a part of the screen that includes buttons, texts, and text fields, making it more readable and reusable.

Please refer to the sections for examples of both [system](/design-to-flutter/creating-components/system-components) and [custom components](/design-to-flutter/creating-components/custom-components).

### How to Create a Component?

You can learn how to create components by watching the video below or by continuing to read this guide.

{% embed url="<https://youtu.be/FiBBZKPWVfQ>" %}
How to create components
{% endembed %}

Monday Hero detects every design element as images, texts, and views, similar to what you see below. It’s crucial to convert these elements into functional components:

![Convert to Components](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-Mc3wYeZU4W6tPuhMtH0%2F-Mc3yFMDBMZ9_RBy4AGY%2FGroup%20452.png?alt=media\&token=754b4b23-c4c1-4cb2-b63c-bf4f94100f75)

Next, begin creating system components.

&#x20;


# System Components

### What is a System Component?

System components are predefined elements available in Dart, and Monday Hero enables you to create instances of these components directly from your designs. You can convert any image, text, or view into system components within your design.

When an instance of a system component is created, code is automatically generated to match the styles and overrides specified in the selected design.

When creating a new instance of a component, you must decide whether it's a Material or Cupertino component. This choice depends on the selection of components used within the app—Material or Cupertino. Material components adhere to Google's Material Design guidelines, which offer a design language commonly associated with Android apps. Conversely, Cupertino components emulate the visual style of iOS apps, aligning closely with Apple’s design principles. With Monday Hero, you can create both Material and Cupertino components. For examples and a more detailed explanation, [click here.](/design-to-flutter/creating-components/system-components/material-and-cupertino-components)

Here is a list of all system components:

<figure><img src="https://479678609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEfkN8oSQyQ4BaBzwxH-4037006485%2Fuploads%2Fil5kX1oFqSZzDENAl1NY%2FScreenshot%202024-04-30%20at%2014.32.05.png?alt=media&amp;token=2589cb29-4124-4459-ab93-32cdd30b52b3" alt=""><figcaption><p>System Components</p></figcaption></figure>

For all the supported components list, [click here](/design-to-flutter/creating-components/system-components/flutter-supported-components).

### How to Create System Component

Start by highlighting the elements and converting them into components. Here is how to create a component instance:

1. **Select and highlight the layers:** Select the layers you want to convert into a component.

![A shortcut for component creation.](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MSbh3WE-LVZ2Uo1uFKC%2F-MSbhX9-OLj-moNxlKVK%2Fcreate-2-short-faster.gif?alt=media\&token=27d1e7da-d687-40c1-99c2-3ce9073c2ebd)

2. **Right-click and choose the component from the menu:** Select the class of your component. Available options include Buttons, TextViews, SearchBars, StatusBars, Lists, Grids, and more.

<figure><img src="https://479678609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEfkN8oSQyQ4BaBzwxH-4037006485%2Fuploads%2FS7cwVgKGSPqdncU5mfj1%2FScreenshot%202024-04-30%20at%2014.10.54.png?alt=media&amp;token=400e44b3-ca2d-4e22-bf33-f53ce6c1e214" alt=""><figcaption><p>Right-Click Menu</p></figcaption></figure>

**OR click the components button and select a component from the screen:** Once you select the tag component instance, you'll see the available options on the screen. Choose one of them to continue.

<figure><img src="https://479678609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEfkN8oSQyQ4BaBzwxH-4037006485%2Fuploads%2FfDWxojrm351q58BR7jDf%2FScreenshot%202024-04-30%20at%2014.09.42.png?alt=media&amp;token=855d6118-0edd-46e7-bb7c-d7d1eef02db6" alt=""><figcaption><p>Tag New Component Instance</p></figcaption></figure>

<figure><img src="https://479678609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEfkN8oSQyQ4BaBzwxH-4037006485%2Fuploads%2FJYNw9w6vuSiQoutPDlPc%2FScreenshot%202024-04-30%20at%2014.12.08.png?alt=media&amp;token=c54003ba-5acd-4295-acd3-203189cc39df" alt=""><figcaption><p>Tag Component Instance Menu</p></figcaption></figure>

3. **Set properties:** For each layer, select the necessary properties such as title, image, or background image. These options will appear in a list.
4. **Finish:** Click 'Finish' to complete the creation process. Once the component is created successfully, you'll be able to see its code on the screen. Additionally, the component type will appear in the left layer list, highlighted on the screen, and the corresponding code on the right will be updated.

<figure><img src="https://479678609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEfkN8oSQyQ4BaBzwxH-4037006485%2Fuploads%2F7aRpQgqif09gRTvynQMX%2FScreenshot%202024-04-30%20at%2016.57.28.png?alt=media&amp;token=fda5dd45-bd67-4c38-9324-7133518d7c31" alt=""><figcaption><p>Elavated Button Created</p></figcaption></figure>

Congrats! It's done. You can also create your own [component library](/design-to-flutter/creating-components/custom-components) for reusing components.


# Material & Cupertino Components

Choosing Between Material and Cupertino Components in Flutter

### Choosing Between Material and Cupertino Components in Flutter

When developing apps in Flutter, designers and developers often face the decision of styling their user interfaces to resemble either an iOS or Android app. This choice is determined by the selection of components—Material or Cupertino—used within the app. Material components adhere to Google's Material Design guidelines, offering a design language commonly associated with Android apps. Conversely, Cupertino components emulate the visual style of iOS apps, aligning closely with Apple's design principles. With Monday Hero, you can create both Material and Cupertino components.

#### Material Button Example

A Material Button is a set of buttons that lead users to take action and make choices. Unlike other buttons, it is created according to Material design rules by Google to help teams build high-quality digital experiences.

With Monday Hero, you can create TextButton, IconButton, ElevatedButton, and OutlinedButton from the MaterialButton class.

* **ElevatedButton** features a label displayed with elevation, making it suitable for adding dimension to mostly flat layouts, such as long, busy lists of content or wide spaces.
* **OutlinedButton** is a label displayed with a stroke but without elevation. It is used for actions that are important but not primary.
* **TextButton** is clickable text used on toolbars, in dialogs, or inline with other content for less important actions.
* **IconButton** is a graphic button filled with color, commonly used in app bars and for in-app actions.

<div data-full-width="true"><img src="https://479678609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEfkN8oSQyQ4BaBzwxH-4037006485%2Fuploads%2F1x19MR2T9poOYyvZqDVl%2FFrame%20436.png?alt=media&amp;token=d8ea86ee-dbf3-429f-9adb-79656a89b320" alt="Different Types of Material Buttons in Flutter"></div>

#### Cupertino Button Example

A Cupertino Button implements the current iOS design language, which is based on Apple's Human Interface Guidelines. It can display either text or an icon, both of which fade in and out upon touch. Unlike Material Buttons, which are used in applications developed for both iOS and Android platforms, the Cupertino Button is exclusively used on the iOS platform. While Material Buttons maintain a consistent style across all platforms, Cupertino Buttons preserve the distinctive iOS-styled app aesthetic.

![](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEfkN8oSQyQ4BaBzwxH-4037006485%2Fuploads%2F1aRKGQe5Xaccodlqg3bD%2FGroup%20496.png?alt=media\&token=181195e3-ce3b-4a12-82a4-b185da1c25b0)

**Material UI Elevated Button Example**

To use the Material UI style buttons, simply select 'Button' instead of looking for 'Material UI Button'. Monday Hero will automatically determine whether it's an **ElevatedButton**, **OutlinedButton**, or another type of button. Here is an example of how to create an ElevatedButton:

Highlight the layers you wish to convert into a component and select the '**Create New Instance of a Button**' option.

<figure><img src="https://479678609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEfkN8oSQyQ4BaBzwxH-4037006485%2Fuploads%2Fvhls9yI4K354XnIYiZKI%2FScreenshot%202024-04-30%20at%2014.36.14.png?alt=media&amp;token=b5584f38-abc2-4356-b346-6f956b18bb7a" alt=""><figcaption></figcaption></figure>

Select the items to define the button's properties. Monday Hero automatically identifies the selected areas and assigns the properties to the button. Click '**Finish**' to complete the process.

![Selecting items and defining fields](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEfkN8oSQyQ4BaBzwxH-4037006485%2Fuploads%2FOZtHCF5plXAuAruEH2ED%2FMy%20Movie-3.gif?alt=media\&token=8724a0ed-b05b-4638-b5d5-6a978c83c09b)

#### Monday Hero Elevated Button Code Result

```
ElevatedButton(
  style: ElevatedButton.styleFrom(
    primary: appColors.cerulean,
    shape: RoundedRectangleBorder(
      borderRadius: BorderRadius.all(Radius.circular(8)),
    ),
    alignment: Alignment.centerLeft,
  )
```


# Flutter Supported Components

Learn supported Flutter components in Monday Hero.

In this section, we'll explore the various Flutter components that are supported in Monday Hero.

Monday Hero streamlines the development process for product teams by providing static code components, which are a significant part of most apps. These supported components can be utilized within Monday Hero to generate functional UI component code, and developers can further customize this to craft their fully functional apps.

Below is a comprehensive table listing the Flutter components supported by Monday Hero, categorized by their functionality:<br>

| Category                  | Component                | Description                                                                                       |
| ------------------------- | ------------------------ | ------------------------------------------------------------------------------------------------- |
| **Menu & Action**         | MaterialButton           | Used for actions, with variations like TextButton, IconButton, ElevatedButton, or OutlinedButton. |
|                           | IconButton               | A button that represents an action with an icon.                                                  |
|                           | CupertinoButton          | An iOS-style button used for user actions.                                                        |
| **Layout & Organization** | Stack                    | Arranges widgets on top of a base widget, often an image, with overlapping possible.              |
|                           | Container                | Customizes its child widget, used for adding padding, margins, borders, or background color.      |
|                           | Row                      | A basic layout widget that arranges widgets horizontally.                                         |
|                           | Column                   | A basic layout widget that arranges widgets vertically.                                           |
| **Content**               | Icon                     | Represents a graphical icon.                                                                      |
|                           | Image                    | Displays an image.                                                                                |
|                           | Text                     | Displays text.                                                                                    |
|                           | ListView                 | A scrollable list of widgets arranged linearly.                                                   |
| **Selection & Input**     | TextField                | Allows users to enter text using a hardware or onscreen keyboard.                                 |
|                           | CupertinoTextField       | An iOS-style text field for entering text.                                                        |
|                           | Switch                   | Toggles the on/off state of a single setting.                                                     |
|                           | CupertinoSwitch          | An iOS-style switch for toggling a setting.                                                       |
|                           | Checkbox                 | Allows users to toggle the state of a single setting option.                                      |
| **Navigation & Search**   | CupertinoSearchTextField | An iOS-style text field used for searching.                                                       |
| **Presentation**          | AlertDialog              | Informs the user about situations that require acknowledgment.                                    |
|                           | CupertinoAlertDialog     | An iOS-style alert dialog.                                                                        |
|                           | SimpleDialog             | A Material Design dialog for simple choices.                                                      |
| **System**                | AppBar                   | A Material Design app bar.                                                                        |
|                           | SnackBar                 | Provides brief notifications at the bottom of the screen.                                         |
| **Various**               | Spacer                   | Adds space before or after a selected layer.                                                      |
|                           | FittedBox                | Scales and positions its child widget according to fit.                                           |
|                           | LimitedBox               | Limits its size only when it's unconstrained.                                                     |
|                           | Wrap                     | Displays its children in multiple horizontal or vertical runs.                                    |
|                           | Center                   | Centers its child within itself.                                                                  |
|                           | Slider                   | A Material Design slider for selecting from a range of values.                                    |
|                           | CupertinoSlider          | An iOS-style slider.                                                                              |
|                           | RangeSlider              | Allows selection of a range from a set of values.                                                 |
|                           | DropdownButton           | A button for selecting from a list of items.                                                      |

*Please note that the descriptions provided for certain components are placeholders and should be completed with relevant information specific to the use case.*


# Custom Components

Create Custom Components and Craft Your Own Library

### What is a Custom Component?

When starting a new project, developers often create their own components. This approach simplifies maintenance and enhances the manageability of our codebase. For example, when a design change is needed for the buttons, it allows us to update a single component's style without having to adjust each button on every screen individually.

Creating custom components also makes the code more readable. Typically, incorporating all components on a screen results in lengthy and complex code. To improve readability, we segment the screen's code by creating new components.

That's why Monday Hero enables you to create custom components! You can select any part of the screen and simply click 'Create Custom Component' to begin. Monday Hero provides the freedom to create any component that’s needed.

In Monday Hero, custom components consist of system components. For instance, a custom component might be a section of the screen that includes buttons, texts, and text fields, making it more readable and reusable.

Monday Hero users generally create two types of components in their projects:

1. **Compact Custom Component**: This type of component is used to create a new style for a system component, such as a button. For example, you might want to create a 'Primary Button' to maintain design consistency across various screens. These components are standalone and do not contain other components within them, like a button that does not include a text field inside. Thus, they are termed compact components.&#x20;
   * For this example, login and signup buttons are called `PrimaryButton` . The component code is separately created, so it can be reused.&#x20;

![Reusable Components](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-Mc42JKFwPyG7-HkChGD%2F-Mc47NcAPnKmkWW_dOSd%2FGroup%20454.png?alt=media\&token=a3074665-d83e-4fe6-b791-900fc2f93131)

2. **Custom Component Group**: This type of component is a part of any screen and is designed to make the code shorter so it's more readable. It may include compact custom components or any other type of component within it.

<figure><img src="https://479678609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEfkN8oSQyQ4BaBzwxH-4037006485%2Fuploads%2FIDp2YgVO33AKO0nfSRym%2FScreenshot%202024-04-30%20at%2016.23.23.png?alt=media&amp;token=375a6b75-384f-41f7-a8bc-a7bf5f9eaec5" alt=""><figcaption><p>Custom Component Code of a Screen</p></figcaption></figure>

### How to Create a Custom Component

1. **Navigate to the Screen:** Go to the screen from which you want to create a component.
2. **Highlight Layers:** Highlight the layers on the screen that you wish to convert into a component.
3. **Select the Component Type:** You can select the component type in three different ways:

Use the smart suggestions provided for component types. If the suggestions do not meet your needs, click 'More' to view the complete list of available components.

<figure><img src="https://479678609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEfkN8oSQyQ4BaBzwxH-4037006485%2Fuploads%2F65NeqOtJKkQdIIydyWjl%2FScreenshot%202024-04-30%20at%2016.32.37.png?alt=media&amp;token=11606ae2-6988-4810-bd04-842516b79e22" alt=""><figcaption></figcaption></figure>

**Right-click and select the component type from the menu.**

<figure><img src="https://479678609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEfkN8oSQyQ4BaBzwxH-4037006485%2Fuploads%2FVZeoJF3k5D4i8mhov0n1%2FScreenshot%202024-04-30%20at%2016.27.17.png?alt=media&amp;token=543c5777-6d8f-4db7-9172-541637eb2f4c" alt=""><figcaption><p>Right-click and Select The Component Type</p></figcaption></figure>

**Alternatively, click the components icon and select 'Create New Component'. Then, choose the component type from the list.**

<figure><img src="https://479678609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEfkN8oSQyQ4BaBzwxH-4037006485%2Fuploads%2FhfmXucl8hezmL35MJ1vz%2FScreenshot%202024-04-30%20at%2016.30.09.png?alt=media&amp;token=4673539e-62ce-4aba-aa32-a22103f46c99" alt=""><figcaption><p>Components Icon</p></figcaption></figure>

<figure><img src="https://479678609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEfkN8oSQyQ4BaBzwxH-4037006485%2Fuploads%2Fc24Fay5ZJaefba7IyzwX%2FScreenshot%202024-04-30%20at%2016.30.16.png?alt=media&amp;token=35a06acd-e325-41ad-acfd-8fbdbeb2c7dc" alt=""><figcaption><p>Component List</p></figcaption></figure>

3. **Set properties:** Once you select the component type, a new screen will appear on the left.

   * For each layer, select the necessary properties such as title, image, or background image. These options will appear in a list.
   * Properties will be automatically guessed by Monday Hero, but remember to adjust them if they don’t match the correct properties.

   Note: Some components do not have any properties. Here is a widget that does not have property selection:

<figure><img src="https://479678609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEfkN8oSQyQ4BaBzwxH-4037006485%2Fuploads%2FoeSFXMgY54fi4d9gMGYn%2FScreenshot%202024-04-30%20at%2016.23.06.png?alt=media&amp;token=405d878c-2906-4bd4-aa3b-b50c8f907163" alt=""><figcaption><p>Widget</p></figcaption></figure>

4. **Name Your Component:**  You will name your component during this step. This name is used to reference your component in your code, making it important to choose a name that you prefer.
5. **Finish:** Click 'Finish' to complete the creation process. Once finished, you will see a confirmation message indicating that the component was created successfully.

<figure><img src="https://479678609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEfkN8oSQyQ4BaBzwxH-4037006485%2Fuploads%2FfBe1F1kQAnKKINLffV3Z%2FScreenshot%202024-04-30%20at%2016.23.15.png?alt=media&amp;token=64ff67d7-683a-461f-840b-58441352c06c" alt=""><figcaption><p>Component Created Successfully</p></figcaption></figure>

Once the component is created successfully, you'll be able to see its code, and it will be ready for reuse.

<figure><img src="https://479678609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEfkN8oSQyQ4BaBzwxH-4037006485%2Fuploads%2FYVpf8LFpJmYvzsvOIjNL%2FScreenshot%202024-04-30%20at%2016.23.23.png?alt=media&amp;token=e2c8d0a3-d462-4b3c-98e0-26804c38bab9" alt=""><figcaption><p>Component Screen</p></figcaption></figure>

All the custom components that you have created in your project will be visible in your custom component library.

<figure><img src="https://479678609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEfkN8oSQyQ4BaBzwxH-4037006485%2Fuploads%2FBgHxCXr24wvr9gtT9Yv1%2FScreenshot%202024-04-30%20at%2016.43.28.png?alt=media&amp;token=50271092-7c81-4a5a-a2bb-dab5cd146d5b" alt=""><figcaption><p>Custom Component Library</p></figcaption></figure>

Congrats! It's done.&#x20;


# Create Responsive Code

Create and edit responsive code on Monday Hero.

### **Why Use Responsive Layouts?**&#x20;

When developing a mobile app, it's essential to ensure consistent functionality across various devices. Responsive design ensures that your app adapts to different screen sizes, preventing overlapping components and overflow errors that can lead to a poor user experience.&#x20;

Monday Hero streamlines this process by automatically generating responsive code tailored to fit every device. It offers the convenience of [automatically guessing](#automatically-add-responsive-components) the responsive components, which you can preview or edit as needed. Alternatively, if you prefer more control, you can manually [add or edit responsive components ](#multi-child-layout-widgets)through Monday Hero.

### **Automatically Add Responsive Components**&#x20;

Click to the 'Make Responsive Layout' button within the 'Widget Tree' menu. This convenient tool automatically guesses and arranges Rows, Columns, and Stacks, making your app ready for different screen sizes. You can easily review and edit the layout as needed once it's ready.

![Using 'Make Responsive Layout' feature](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEfkN8oSQyQ4BaBzwxH-4037006485%2Fuploads%2F39Btt232vuYTrSZ4StYp%2Fhey.gif?alt=media\&token=565b9c37-9770-44ec-832c-c3509099cdbc)

### Manually Add or Edit Multi-Child Layout Widgets For Responsive Layout <a href="#multi-child-layout-widgets" id="multi-child-layout-widgets"></a>

Flutter provides multi-child layout widgets like Row, Column, and Stack for arranging items. You manually arrange items by using multi-child layout widgets in Flutter. These widgets get multiple items as a list in their 'children' property and arrange them in the list order. Row, column, and stack are the most used examples.

#### Row&#x20;

Row is a widget that arranges its children horizontally in a line. Here's an example of how to group multiple widgets in a row:

![Adding rows](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEfkN8oSQyQ4BaBzwxH-4037006485%2Fuploads%2FrzW6cuG4gunxDzPapyGo%2Fgif-3.gif?alt=media\&token=47d0e6e4-bf9d-4940-b0de-7b67ea0f90e1)

#### Column&#x20;

Column is a widget that arranges its children vertically in a stack. Here's an example of how to group multiple widgets in a column:

![Adding columns](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEfkN8oSQyQ4BaBzwxH-4037006485%2Fuploads%2FAgQm3sSAffYR7ZFecjIM%2FMy%20Movie-3.gif?alt=media\&token=ee7d2c06-be1d-41b0-bd3c-dd163b07bdaa)

**Common Alignment Options**

These properties control how widgets are aligned within Rows and Columns:

* **MainAxisAlignment**: Aligns children horizontally (for Row) or vertically (for Column).
* **CrossAxisAlignment**: Aligns children vertically (for Row) or horizontally (for Column).

![Main Axis and Cross Axis Properties of Row and Column](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEfkN8oSQyQ4BaBzwxH-4037006485%2Fuploads%2FkTFF7lih9LTK6T6qobNP%2Faxis.png?alt=media\&token=36ea8f98-b6b8-4336-b572-a3a8a528d4df)

Options for MainAxisAlignment and CrossAxisAlignment include:

* **Start**: Places children at the start of the widget.
* **End**: Places children at the end of the widget.
* **Center**: Places children at the center of the widget.
* **Space Between**: Distributes space evenly between children.
* **Space Around**: Distributes space evenly around children.
* **Space Evenly**: Distributes space evenly between, before, and after each child.

You can adjust alignment properties directly within Monday Hero when grouping UI elements.

![Setting Main Axis and Cross Axis properties](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEfkN8oSQyQ4BaBzwxH-4037006485%2Fuploads%2FCvTv48VWAEVePWgoFmzC%2FGroup%20486.png?alt=media\&token=a6471536-a2a8-43d8-af9d-3e5fa66afefa)

#### Stack

Stack is a widget that allows you to position its children relative to the edges of its box. It's particularly useful for overlapping multiple children, such as mixing texts, images, and buttons seamlessly. Here's an example demonstrating how to group multiple widgets in a stack:

![Adding stack](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEfkN8oSQyQ4BaBzwxH-4037006485%2Fuploads%2Fkyn3i2HnknjwnlSfZbme%2FMy%20Movie-4.gif?alt=media\&token=06c79ace-857c-4113-86af-0fef413c860e)


# Colors

When you import a design into Monday Hero, it identifies all the colors used in the design and saves them in HEX and RGB formats, along with their opacity values. It also removes duplicates to ensure your app has no redundant colors.

Navigate to the 'Theme/Colors' tab to review and rename the colors in your project. Please note that all colors are automatically downloaded when you sync the code with your project.

<figure><img src="https://479678609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEfkN8oSQyQ4BaBzwxH-4037006485%2Fuploads%2FnPgDmnsEnJnrMwlcCvxE%2FScreenshot%202024-04-29%20at%2019.58.01.png?alt=media&amp;token=192a965d-78e7-4e0f-b164-fe7f0d407c99" alt=""><figcaption><p>Monday Hero Color Screen</p></figcaption></figure>

#### Generated Code Example:

{% tabs %}
{% tab title="Flutter" %}

```dart
import 'package:flutter/material.dart';

abstract class MHAppColors {
  Color get anchor => const Color(0xff3a434f);
  Color get cloud => const Color(0xffb3bfd0);
  Color get daisy => const Color(0xffffffff);
  Color get pewter => const Color(0xff5c6979);
  Color get salt => const Color(0xffe6e6e6);
  Color get silver => const Color(0xffa8b6c8);
  Color get spruce => const Color(0xff323b45);
}

```

Check out the following directory to access the colors file generated by Monday Hero:

```
/ProjectName/lib/theme/mh_generated/mh_app_colors.dart
```

{% endtab %}
{% endtabs %}


# Text Styles

When you import a design into Monday Hero, it identifies all the text fonts used in the design and records the font family, size, and weight for each text element. Monday Hero then creates a list of text styles for you, removing any duplicates to ensure your app has a streamlined set of text styles.

Navigate to the 'Theme/Text Styles' tab to review and rename the text styles in your project. Please note that all text styles are automatically downloaded when you sync the code with your project.

{% hint style="info" %}
Monday Hero supports various font weights, including normal, bold, and italic. However, underlined and strikethrough text, as well as the addition of hyperlinks, are not supported in Monday Hero.
{% endhint %}

<figure><img src="https://479678609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEfkN8oSQyQ4BaBzwxH-4037006485%2Fuploads%2FyCJ3aW9USYdgSl4ZZ8S1%2FScreenshot%202024-04-29%20at%2020.05.39.png?alt=media&amp;token=69839c89-088d-4dfb-b0a8-072ac3471364" alt=""><figcaption><p>Monday Hero Theme / Text Styles</p></figcaption></figure>

Generated code example:

{% tabs %}
{% tab title="Flutter" %}

```dart
import 'package:flutter/material.dart';

abstract class MHAppTextStyles {
  TextStyle textStyle({Color? color}) => TextStyle(
    fontSize: 12.0,
    fontFamily: "HelveticaNeue",
    color: color);
  TextStyle textStyle2({Color? color}) => TextStyle(
    fontSize: 14.0,
    fontFamily: "HelveticaNeue-Bold",
    color: color);
  TextStyle textStyle3({Color? color}) => TextStyle(
    fontSize: 14.0,
    fontFamily: "HelveticaNeue",
    color: color);
  TextStyle textStyle4({Color? color}) => TextStyle(
    fontSize: 16.0,
    fontFamily: "HelveticaNeue-Bold",
    color: color);
}
```

Check out the following directory to access the fonts file generated by Monday Hero:

```
/ProjectName/lib/theme/mh_generated/mh_app_text_styles.dart
```

{% endtab %}
{% endtabs %}


# Assets

All images are automatically sliced and uploaded to Monday Hero during the design file import process. To ensure they are cut correctly, verify that the images are grouped appropriately and set as exportable, as explained [here](/getting-started/design-handoff-to-ios-android-developer).

Navigate to the 'Theme/assets' tab to check the assets in your project, rename and download assets. You have the option to download assets individually or in bulk. Please note that all assets are automatically downloaded when you [sync the code](/design-to-flutter/sync-code) with your project.

<figure><img src="https://479678609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEfkN8oSQyQ4BaBzwxH-4037006485%2Fuploads%2FTW6b4RVpzcRh6yGAvfQ0%2FScreenshot%202024-04-29%20at%2019.45.56.png?alt=media&amp;token=2f9e9af9-3855-4607-adde-1d612006ec8c" alt=""><figcaption><p>Monday Hero Theme / Assets Screen</p></figcaption></figure>

You can export assets to your Monday Hero project as PNG (1x, 1.5x, 2x, 3x, 4x) and/or SVG, depending on your needs. To change the asset format in your project, go to the Settings Screen.

<figure><img src="https://479678609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEfkN8oSQyQ4BaBzwxH-4037006485%2Fuploads%2FDl9c694Cv1B2J4JBxIAA%2FScreenshot%202024-04-29%20at%2019.48.13.png?alt=media&amp;token=ef29432c-c1e0-474d-8f8d-7cff9caf356c" alt=""><figcaption><p>Settings Screen</p></figcaption></figure>


# Sync Code

After you have completed creating new components and editing assets, you're ready to retrieve your code! You can synchronize the updated code with your local project files.

### Options for Synchronization

* **Sync to Your Own Project:** If you prefer to use your existing project, ensure that it includes the necessary localization and router libraries as explained[ here](/design-to-flutter/flutter-project-base/integrate-monday-hero-to-your-existing-project). This approach requires manual setup of dependencies.
* **Use Our Base Project for a Quick Start:** For a faster setup, you can utilize our [Base Project,](/design-to-flutter/flutter-project-base/fast-start-with-monday-hero-starter-project) which comes pre-configured with all required dependencies, allowing you to start immediately without additional setup.

### **Save The Project Path**

To sync your code to your project, Monday Hero needs to know the project path where you want the files added. Monday Hero will automatically prompt you for this path when you initiate the syncing process. Alternatively, you can specify the path manually by accessing the settings.

![Opening Sync settings.](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEfkN8oSQyQ4BaBzwxH-4037006485%2Fuploads%2Fhbs1T4Y17sCIJq9uobQY%2FImage1.png?alt=media\&token=f08f3d7c-bdd5-4085-acfa-8834ed97d092)

Once you are on the Settings screen, click the 'see more' icon, represented by '...', and select your project path.

<img src="https://479678609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEfkN8oSQyQ4BaBzwxH-4037006485%2Fuploads%2FNBa8AaV4sGnKgTyVhNMR%2FProjectPath.png?alt=media&amp;token=cf232876-b904-46c6-87e1-e731f19d4211" alt="Choose your project path to sync." width="378">

Ensure that the **Project Name** matches the name in the `pubspec.yaml` file, then save your changes.

![Project name needs to match the name in the pubspec.yaml file.](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEfkN8oSQyQ4BaBzwxH-4037006485%2Fuploads%2FmvIqfOXeeN87IQ6aNpci%2FGroup%20488.png?alt=media\&token=36e7c2db-29e0-4c94-ba8a-c3025819ea18)

![Saving project path and the 'Save' button.](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEfkN8oSQyQ4BaBzwxH-4037006485%2Fuploads%2FeddCEdCjRsnvP936pB6A%2FGroup%20488.png?alt=media\&token=21e923a0-041a-4ac1-a8c2-fd378fcd511c)

Once you click 'Save', you're now ready to start syncing your project.

### Synch Code to Your Project

Once you save your project path, you're ready to sync your code. Monday Hero automatically updates the files in your local directory.

#### Synch All Screens

If you want to sync all the screens, components, assets, colors, font styles, and more, you should choose the 'Sync All Screens' option. Select this option from the drop-down menu and wait a few seconds while Monday Hero processes the updates. You're now up to date!

#### Synch This Screen/Component

If you prefer to sync only the screen or component you're currently working on, click the '**Sync This Screen**' option in the drop-down menu. Just wait a few seconds while Monday Hero does its job. You're up to date!

<figure><img src="https://479678609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEfkN8oSQyQ4BaBzwxH-4037006485%2Fuploads%2FerPdzUKn9sdvOZsdE8oO%2FImage3.png?alt=media&amp;token=7d2df30e-7718-4394-aff5-525366114f63" alt=""><figcaption><p>Synch to My Project</p></figcaption></figure>


# Flutter Project Base

Setting up your Flutter project environment with Monday Hero

Before you begin working with the Flutter code generated by Monday Hero, it's important to set up your development environment. Below, we outline the necessary dependencies and how to configure everything.

### Setting Up the Development Environment

To build Flutter apps, ensure that you have the following dependencies installed:

* Flutter SDK version 2.0.0 or later
* Dart SDK version 2.12.0 or later

If you haven't already, refer to  [Flutter's official documentation](https://docs.flutter.dev) for instructions on setting up your project environment.

### Monday Hero Directory Structure

In Monday Hero, the folder structure of a Flutter project typically looks like this:

```
├── mondayhero_project
   ├── assets
   │   ├── fonts                          # Fonts directory (.otf, .ttf)
   │   │   ├── **.otf
   │   │   ├── **.ttf
   │   │   └─── ...
   │   │
   │   ├── images                         # Images directory (.svg, .png, .jpg)
   │   └── translations
   │       ├── en-US.json                 # English translation (.json)
   │       └── mh_generated               # Monday Hero Generated translations directory
   │           └── en-US.json
   ├── lib
   │   ├── core
   │   │   └── localization
   │   │       └── mh_localization_asset_loader.dart
   │   │
   │   ├── design-system
   │   │   └── components                  # Created custom components
   │   │       └─── ...
   │   │
   │   ├── route
   │   │   └── app_router.dart
   │   │   └── app_routes.dart                  
   │   │
   │   ├── main.dart                       # App start
   │   │
   │   └── theme                           # App theme configuration directory
   │       ├── app_colors.dart
   │       ├── app_text_styles.dart
   │       └── mh_generated                # Monday Hero Generated theme files
   │           ├── mh_app_colors.dart      # Colors used in the design document
   │           └── mh_app_text_styles.dart # Text styles used in the design document
   │
   └── pubspec.yaml                        # Includes project name, version, environment, dependencies, assets path, fonts etc.
```

* **mondayhero\_project**: Root directory of the Flutter project.
  * **assets**: Contains static assets used in the app, such as fonts, images, and translations.
    * **fonts**: Directory for font files (.otf, .ttf) used in the app.
    * **images**: Directory for image files (.svg, .png, .jpg) used in the app.
    * **translations**: Directory for localization files (.json) providing translations for different languages.
      * **en-US.json**: English translation file.
      * **mh\_generated**: Monday Hero Generated translations directory.
        * **en-US.json**: Automatically generated translation file.
  * **lib**: Contains Dart source code files for the Flutter project.
    * **core**: Core functionality of the app.
      * **localization**: Directory for localization-related files.
        * **mh\_localization\_asset\_loader.dart**: Asset loader for localization.
    * **design-system**: Houses custom components created for the app.
      * **components**: Directory for custom UI components.
    * **route**: Handles app routing and navigation.
      * **app\_router.dart**: Defines the app router.
      * **app\_routes.dart**: Contains route definitions.
    * **main.dart**: Entry point of the app.
    * **theme**: Contains app theme configuration files.
      * **app\_colors.dart**: Defines the app color scheme.
      * **app\_text\_styles.dart**: Defines text styles used throughout the app.
      * **mh\_generated**: Monday Hero Generated theme files.
        * **mh\_app\_colors.dart**: Automatically generated color definitions.
        * **mh\_app\_text\_styles.dart**: Automatically generated text styles.
* **pubspec.yaml**: YAML file specifying project dependencies and metadata for the Flutter project.

You have two options for setting up your project: you can sync the code directly into [a project provided by Monday Hero](/design-to-flutter/flutter-project-base/fast-start-with-monday-hero-starter-project), or you can [manually install the dependencies ](/design-to-flutter/flutter-project-base/integrate-monday-hero-to-your-existing-project)yourself.


# Fast Start with Monday Hero Starter Project

Sync faster by using the starter project.

Monday Hero provides a base project on GitHub to expedite the synchronization process. This project contains essential elements to facilitate building and preparing your app for immediate use.

Here's how to get started:

1. Download the code from GitHub and unzip it to your desired location.

{% embed url="<https://github.com/mondayhero/flutter-starter-project>" %}
Monday Hero Starter Project
{% endembed %}

![Starter Project on GitHub](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEfkN8oSQyQ4BaBzwxH-4037006485%2Fuploads%2FwJx931K7AUlgGWqw9ksz%2FGroup%20497.png?alt=media\&token=0debd765-e911-476b-9698-2be89736b661)

Optionally, you can clone the repository directly from GitHub using the following link:

```
https://github.com/mondayhero/flutter-starter-project
```

2. Navigate to the project root directory in your terminal or command prompt and execute the following command to install the required dependencies:

```
flutter pub get
```

3. Build and run the project using the following command:

```
flutter run lib/main.dart
```

Now you're all set and ready to utilize the developer tools built into Monday Hero!


# Integrate Monday Hero to your Existing Project

Manually add dependencies and sync code for integration

If you already have a Flutter project, you can integrate it into Monday Hero by manually installing the dependencies in your workspace. After you complete the instructions on this page, use the sync function as explained on the next page. Monday Hero will automatically create the missing folders/files.

### Setting Up The Localization Requirements

MHLocalizationAssetLoader is an essential custom asset loader for managing app-specific localization files and Monday Hero-generated localization files. This allows translation files under both assets/translations and assets/translations/mh\_generated to be used in the app and managed separately.

**Step 1:** Add the '**easy\_localization**' package in your pubspec.yaml and complete installation by executing the following command in your project root. Check out [the package documentation](https://pub.dev/packages/easy_localization/install) for more information if needed.

```
flutter pub add easy_localization
```

**Step 2:** Declare your asset directories in the pubspec.yaml file.

```
assets:
    #Localization Files
    - assets/translations/
    # Localization Files generated by Monday Hero
    - assets/translations/mh_generated/
    - assets/images/
```

**Step 3:** Navigate to the file where your project's main() function is located. By default, this is the main.dart file. Add the following imports:

```
import 'package:easy_localization/easy_localization.dart';
import 'core/localization/mh_localization_asset_loader.dart';
```

**Step 4:** Call 'await EasyLocalization.ensureInitialized();' in your main function.

* Set the path as 'assets/translations'
* Set assetLoader as const MHLocalizationAssetLoader()
* Set child as your app instance.

#### Sample Configuration:

```
void main() async {
  WidgetsFlutterBinding.ensureInitialized();
  await EasyLocalization.ensureInitialized();
  runApp(
    EasyLocalization(
      supportedLocales: const [
        Locale('en', 'US'),
      ],
      path: 'assets/translations',
      assetLoader: const MHLocalizationAssetLoader(),
      fallbackLocale: const Locale('en', 'US'),
      child: const MyApp(),
    ),
  );
}
```

### Setting Up The App Router

Flutter features an idiomatic declarative routing mechanism similar to the build methods used with widgets. To implement this mechanism in your projects with Monday Hero, you need to adjust your app definition from the MaterialApp() widget.

Step 1: Navigate to your app definition and delete the home value if your app has one.

Step 2: Set initialRoute and onGenerateRoute as follows:

```
MaterialApp(
   // ...
   initialRoute: AppRoutes.init,
   onGenerateRoute: (settings) => AppRouter.generateRoute(settings),
   // ...
    )
```

You're all set! Next, synchronize the project with your local directory to obtain the missing folders and files.


# Shadows, Gradients, and Other Design Elements

In this section, we'll explore how Monday Hero works with the Figma plug-in.

Here's a list of the information that Monday Hero can process effectively to give you the best results.&#x20;

### Shadow and Blur Effects

You can add blur and shadow effects on Figma to add aesthetics and functionality to your designs. Figma allows you to add drop shadow, inner shadow, layer blur, and background blur effects. You can choose your desired effect with targeted properties and Monday Hero can generate the relevant code for all of them.

<figure><img src="https://479678609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEfkN8oSQyQ4BaBzwxH-4037006485%2Fuploads%2FL0sU7fdMKcer9KY3Y03B%2FGroup%20504.png?alt=media&amp;token=a0add835-bce8-47db-a257-f68177cc441a" alt=""><figcaption><p>Adding the drop shadow effect</p></figcaption></figure>

### Gradients

Figma has different fill options like linear, radial, angular, and diamond to create the gradient effect. Unfortunately, Monday Hero doesn't support these gradient features. That's why, when you're uploading a design to Monday Hero, please be sure that you only use the '**solid fill**' option.

<figure><img src="https://479678609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEfkN8oSQyQ4BaBzwxH-4037006485%2Fuploads%2Fe0XzwLBZHnZ6d0WudVx6%2FGroup%20505.png?alt=media&amp;token=4ae9e45d-67f6-4011-a9f8-02aa39399172" alt=""><figcaption><p>Only solid fill option is supported in Monday Hero.</p></figcaption></figure>

### Borders

When you apply borders to an image, you can change its color, weight, distribution, side, and endpoint properties from Figma. With Monday Hero, you can get the relevant code of these properties.

<figure><img src="https://479678609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEfkN8oSQyQ4BaBzwxH-4037006485%2Fuploads%2FQnRTUA1YAaTz6Xgl4nij%2Fimage.png?alt=media&amp;token=eea66c3e-1d03-43b8-a6fd-6e311b6b12d7" alt=""><figcaption><p>Monday Hero generates the code according to border properties at Figma.</p></figcaption></figure>

### Animations

Animations in Figma are not a supported feature in Monday Hero. That's why, please only upload designs with no animation.


# Troubleshooting Guide

Detecting and Resolving Bugs in Your Monday Hero Experience

Welcome to the Monday Hero Troubleshooting Guide! Here, you'll find helpful tips and techniques for identifying and resolving common issues that may arise while using Monday Hero. Whether you're encountering errors, glitches, or unexpected behavior, we're here to help you get back on track swiftly.

* If you're having trouble achieving the desired code, please refer to [this checklist](/design-to-flutter/troubleshooting-guide/checklist-for-design-element-review-and-code-generation):

{% content-ref url="/pages/gFBdbZ1KEHCdVBB2PXqp" %}
[Checklist for Design Element Review and Code Generation](/design-to-flutter/troubleshooting-guide/checklist-for-design-element-review-and-code-generation)
{% endcontent-ref %}

* If you're experiencing issues with the Github - Monday Hero Starter Project, please refer to:

{% content-ref url="/pages/2ZodUpbExP7nIEnqCgCG" %}
[Github Monday Hero Starter Project Troubleshooting](/design-to-flutter/troubleshooting-guide/github-monday-hero-starter-project-troubleshooting)
{% endcontent-ref %}

If you're encountering any other problems, please feel free to contact us [on Discord](https://discord.com/invite/VzdqXhJtqt) or [report a bug](https://mondayhero.atlassian.net/servicedesk/customer/portal/2).


# Checklist for Design Element Review and Code Generation

Design Element Review and Checklist

If the code you downloaded from Monday Hero doesn't match your expectations, it might be due to issues with the design files. Follow these steps to troubleshoot and resolve any problems:

**Review Design Elements:** Before anything else, examine all the design elements listed in the left menu. While Monday Hero typically removes unnecessary layers, you might need to manually remove some to ensure accurate code generation. Refer to the **checklist** below for reviewing design elements.&#x20;

**Checklist:** Let's use a real-life example from the Sage AI app to guide us through a checklist for your design.&#x20;

Start by clicking on elements in the widget tree. Each click will highlight the corresponding layer on the screen image. Remember, every layer in the widget tree generates code.

Start the checklist by clicking on elements on the widget tree. Once you click on the layer, it will be highlighted on the screen image. Every layer in the widget tree will generate a code for the layer. While Monday Hero typically removes unnecessary layers, you might need to manually remove some to ensure accurate code generation while checking the checklist.

* [**Check 1:** Incorrectly grouped or ungrouped images.](#check-1-incorrectly-grouped-or-ungrouped-images)
* [**Check 2:** Unnecessary layers.](#check-2-unnecessary-layers)
* [**Check 3:** Incorrect component types.](#check-3-incorrect-component-types)
* [**Check 4:** Inspect Layout Components](#check-4-inspect-layout-components)
* [**Check 5:** Bug Fix or Add New Code With Hero AI Assistant](#check-5-bug-fix-or-add-new-code-with-hero-ai-assistant)

### **Checklist:**

#### **Check 1:** Incorrectly grouped or ungrouped images.&#x20;

**Problem:** In the example below, the cat image consists of too many layers, as seen in the gif below. Having too many layers means Monday Hero will generate separate code for each layer in the widget. Since we only want one image code for one image, we need to group the layers to treat them as a single image.

<figure><img src="https://479678609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEfkN8oSQyQ4BaBzwxH-4037006485%2Fuploads%2FwbHrnhR8dd5t0cNCebkO%2FTroubleshooting-1.gif?alt=media&amp;token=9966c1d7-df5d-43a5-a4da-dc05838e3d34" alt=""><figcaption><p>Check layers</p></figcaption></figure>

**Solution:**&#x20;

To resolve this issue, you need to group all the layers of the image using your design tool. Once you've grouped them, ensure the group is exportable as a single layer instead of multiple layers. Don't forget to upload the same design to Monday Hero for updating. For detailed instructions, read the information [here](/getting-started/design-handoff-to-ios-android-developer):

[Prepare Design to Get the Best Code Results](/getting-started/design-handoff-to-ios-android-developer)&#x20;

Once you've addressed this layering problem, the image will appear as a single entity, eliminating unnecessary code.

<figure><img src="https://479678609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEfkN8oSQyQ4BaBzwxH-4037006485%2Fuploads%2FHjRTbVL8793trzPBDeef%2FScreenshot%202024-05-05%20at%2022.44.21.png?alt=media&amp;token=e235e0f3-d063-4293-bc9a-6e85dfc8f3ad" alt=""><figcaption><p>Figma File - Group and make exportable.</p></figcaption></figure>

<figure><img src="https://479678609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEfkN8oSQyQ4BaBzwxH-4037006485%2Fuploads%2Fzh6A1qtJO4js2XvLLZw4%2FTroubleshooting%203.png?alt=media&amp;token=438a439d-1ea6-40a2-94b1-773f6fac35c5" alt=""><figcaption><p>Fixed code</p></figcaption></figure>

#### **Check 2:** Unnecessary layers.

**Problem:** When you're inspecting the layers, you might notice some that aren't visible on the image but are still highlighted. This occurs because the layer exists in your design for some reason, such as being hidden behind another layer or forgotten there. Including unnecessary layers can clutter the code and affect performance.

**Solution:** To address this issue, ensure to remove any unnecessary layers from your design. You can do this by directly deleting them or by selecting 'do not include' from the code generation options. This step ensures that only essential layers are included in the code generation process, resulting in cleaner and more efficient code.

<figure><img src="https://479678609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEfkN8oSQyQ4BaBzwxH-4037006485%2Fuploads%2FssrtczsBbw4mOAM2FYRi%2FScreenshot%202024-05-05%20at%2023.36.54.png?alt=media&amp;token=90b1426e-fb13-4cc2-a9cc-c5e545194e9b" alt=""><figcaption><p>Don't include to the Code Generation</p></figcaption></figure>

#### **Check 3:** Incorrect component types.

**Problem:** While inspecting layers, you may notice that they do not have the correct component name. For example, in the image below, there is a **container** named 'buttonView' and it contains a **text**. However, it is preferable to consolidate them into **a single button** component in the code, rather than having them as separate layers.

**Solution:** Ensure that the layers have the correct component type. If you haven't created components yet, select the layers and create the appropriate components, such as buttons. For detailed instructions on creating components, refer to the documentation available [how to create components here](/design-to-flutter/creating-components).

<figure><img src="https://479678609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEfkN8oSQyQ4BaBzwxH-4037006485%2Fuploads%2FihX29tYpidP3fvq0vvMJ%2FScreenshot%202024-05-05%20at%2023.38.45.png?alt=media&amp;token=61c3bc58-1a8d-40e3-ae9e-631906d30d6b" alt=""><figcaption><p>Create Components</p></figcaption></figure>

#### Check 4: Inspect Layout Components

**Problem:** Once you're sure you've completed the first 3 elements on the checklist, you're ready to inspect the layout. Monday Hero automatically creates the layout elements once the 'Make Layout Component' button is clicked. Then, it will automatically create rows, columns, and stacks.  Once you preview the code result if the layout doesn't become responsive the way you'd like, then the layout problem should be fixed. If they are not grouped correctly, the responsive layout won't work as expected.

**Solution:** Once you preview the code result and the layout doesn't become responsive the way you'd like, please right-click and edit the rows, columns, and stacks to achieve the desired result. For more information on Monday Hero how to create and edit them, please refer to [our documentation.](/design-to-flutter/create-responsive-code)

The layout elements work in the same way as they normally do in the code. So if you're unsure how they function, please refer to the Flutter official website.

<figure><img src="https://479678609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEfkN8oSQyQ4BaBzwxH-4037006485%2Fuploads%2F1lGso3NTUQTKNK9fzLsI%2FScreenshot%202024-05-06%20at%2001.17.53.png?alt=media&amp;token=f5923ba9-7097-4567-ae14-77e96013724c" alt=""><figcaption><p>Edit Layout</p></figcaption></figure>

#### Check 5: Bug Fix or Add New Code With Hero AI Assistant

**Problem:** After completing the first 4 checklist elements, if you still haven't achieved the desired code result, it may be due to encountering an overflow bug or missing a layout element.

**Solution:** Click the AI Assistant button in the code section. You can then choose from pre-written prompts or write your own. Select "Overflow bug fix" for overflow bugs, or describe your bug and begin fixing it with the Hero AI Assistant. If you require new prompts, you can request them via the [suggest a new feature](https://mondayhero.frill.co/b/6m46x8v4/feature-ideas) link.

<figure><img src="https://479678609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEfkN8oSQyQ4BaBzwxH-4037006485%2Fuploads%2Fo09IgQSRsdrrlgPUlvZw%2FScreenshot%202024-05-06%20at%2001.27.05.png?alt=media&amp;token=c987c4e5-8c29-4941-8c71-f44fc78a9882" alt=""><figcaption><p>Hero AI Assistant.</p></figcaption></figure>

Congratulations on being a bug hunter! We hope you've achieved the desired code results with Monday Hero. If you still encounter issues or simply want to chat with us, please feel free to reach out. We look forward to hearing from you!


# Github Monday Hero Starter Project Troubleshooting

Monday Hero provides a base project on GitHub to expedite the synchronization process. On this page, we'll address the known issues you might encounter with the template project.

**CocoaPods error:**

If you encounter this error in the terminal:

<figure><img src="https://479678609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEfkN8oSQyQ4BaBzwxH-4037006485%2Fuploads%2FtwuVj9ba6bsqyXPAYj9D%2FScreenshot%202024-05-05%20at%2021.30.49.png?alt=media&amp;token=b29e865a-de0a-4a26-a9a7-728e8208ed1b" alt=""><figcaption><p>Cocapods Error</p></figcaption></figure>

Fix it by following the steps below:

1. Navigate to iOS/podfile.
2. Uncomment the line 'platform :ios, '12.0'' as shown below.

   ```ruby
   platform :ios, '12.0'
   ```

<figure><img src="https://479678609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEfkN8oSQyQ4BaBzwxH-4037006485%2Fuploads%2FJsWcOzBepwBiT9GB3xw9%2FScreenshot%202024-05-05%20at%2021.32.45.png?alt=media&amp;token=f77cd5c7-76e9-464f-9a85-8d2f3c7750df" alt=""><figcaption><p>Podfile Changes 1</p></figcaption></figure>

3. Comment or delete the lines below.

<figure><img src="https://479678609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEfkN8oSQyQ4BaBzwxH-4037006485%2Fuploads%2FCewnjG8bEQkHapPxgPrY%2FScreenshot%202024-05-05%20at%2021.34.22.png?alt=media&amp;token=dff806d2-3bae-41c6-b96d-4e0fcb88ad29" alt=""><figcaption><p>Podfile Changes 2</p></figcaption></figure>

4. Go to the terminal and run 'Flutter clean' followed by 'Flutter pub get'.

You're all set.


# Convert Design to Swift

Create your iOS App with Monday Hero

You can now easily convert Figma, Adobe XD, and Sketch designs into Swift code to build natively compiled apps for iOS.

Join the Flutter community on our Discord. If you find a bug or have any suggestions, please contact us on our [Discord community](http://bit.ly/HeroesInDiscord).

### How to Get Swift Code?&#x20;

1. [Log in](/getting-started/login-create-project-in-monday-hero) to your Monday Hero account.
2. [Create a Flutter project](/getting-started/login-create-project-in-monday-hero).
3. [Upload](/getting-started/import-design-files-into-monday-hero) designs to your project. Please make sure the designs are revised to[ get the best code results](/getting-started/design-handoff-to-ios-android-developer) on Monday Hero.
4. Create [your components](/design-to-swift/creating-components) like Buttons, Lists, and more.
5. Export XCode Project and run.&#x20;

{% hint style="info" %}
If you don't have a design, we have a demo at Figma Community prepared for you. [Click here to view](https://www.figma.com/community/file/1052567636946646090) and start discovering the app.
{% endhint %}

Here is a complete iOS App Tutorial:

{% embed url="<https://youtu.be/QWVfy_p6xo0?si=emEP-NbCFzM4sANN>" %}
Complete iOS App Tutorial
{% endembed %}


# Create Swift Components

Create components like buttons, text fields, lists, grids, and much more...

Monday Hero is designed to automatically recognize the images, texts, and views in your design. However, to develop a fully functioning app, essential components such as buttons and text fields must be manually created. This document guides you through creating components on Monday Hero to achieve a fully operational app.

### Types of Components

In Monday Hero, there are two main types of components: System Components and Custom Components.

* [**System Components:**](/design-to-swift/creating-components/system-components) These are predefined components provided by the development language, such as a Material Button.
* [**Custom Components:**](/design-to-swift/creating-components/custom-components) These are components that you create using system components. For example, a custom component might be a part of the screen that includes buttons, texts, and text fields, making it more readable and reusable.

Please refer to the sections for examples of both system and custom components.

### How to Create a Component?

You can learn how to create components by watching the video below or by continuing to read this guide.

{% embed url="<https://youtu.be/FiBBZKPWVfQ>" %}
How to create components
{% endembed %}

Monday Hero detects every design element as images, texts, and views, similar to what you see below. It’s crucial to convert these elements into functional components:

![Convert to Components](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-Mc3wYeZU4W6tPuhMtH0%2F-Mc3yFMDBMZ9_RBy4AGY%2FGroup%20452.png?alt=media\&token=754b4b23-c4c1-4cb2-b63c-bf4f94100f75)

Next, begin creating system components.


# System Components

### What is a System Component?

System components are predefined elements available in Swift, and Monday Hero enables you to create instances of these components directly from your designs. You can convert any image, text, or view into system components within your design.

When an instance of a system component is created, code is automatically generated to match the styles and overrides specified in the selected design.

Here is a list of all system components, for all the supported components list, [click here](/design-to-swift/creating-components/system-components/swift-supported-components).

<figure><img src="https://479678609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEfkN8oSQyQ4BaBzwxH-4037006485%2Fuploads%2FNyAuUIz2emrqNLc9wz40%2Fimage.png?alt=media&amp;token=d8398664-a1b8-4106-8407-8208474794e4" alt=""><figcaption><p>UI Kit Components</p></figcaption></figure>

Here is a button code example with System Components:

{% tabs %}
{% tab title="iOS" %}

```swift
//ProfilePageViewController.swift
import UIKit

class ProfilePageViewController: UIViewController {

  // The button with an image and text
	@IBOutlet private weak var followButton: UIButton!
  
	override func viewDidLoad() {
		super.viewDidLoad()
		setupViews()
		setupLayout()
	}
}

extension ProfilePageViewController {
	private func setupViews() {
		
		// The button with an image and text
		followButton.layer.cornerRadius = 6
		followButton.layer.masksToBounds =  true 
		followButton.backgroundColor = UIColor.cerulean
		followButton.setTitle(NSLocalizedString("follow", comment: ""),for: .normal)
		followButton.setTitleColor(UIColor.daisy, for: .normal)
		followButton.titleLabel?.font = UIFont.textStyle7
		followButton.contentHorizontalAlignment = .leading 
		followButton.contentEdgeInsets = UIEdgeInsets(top: 6, left: 9 , bottom: 6, right: 9)
	
	}

	private func setupLayout() { 
		//Constraints are defined in Storyboard file.
	}
}
```

{% endtab %}
{% endtabs %}

All the components are explained separately in the following pages.

### How to Create A System Component

Start by highlighting the elements and converting them into components. Here is how to create a component instance:

1. **Select and highlight the layers:** Select the layers you want to convert into a component.

![A shortcut for component creation.](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MSbh3WE-LVZ2Uo1uFKC%2F-MSbhX9-OLj-moNxlKVK%2Fcreate-2-short-faster.gif?alt=media\&token=27d1e7da-d687-40c1-99c2-3ce9073c2ebd)

2. **Right-click and choose the component from the menu:** Select the class of your component. Available options include Buttons, TextViews, SearchBars, StatusBars, Lists, Grids, and more.

<figure><img src="https://479678609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEfkN8oSQyQ4BaBzwxH-4037006485%2Fuploads%2FloXavMKGpA1qdj1fD0XB%2FScreenshot%202024-04-30%20at%2017.07.01.png?alt=media&amp;token=46ae8266-d1be-418c-aa1f-978f850b8e80" alt=""><figcaption><p>Right-Click Menu</p></figcaption></figure>

**OR click the components button and select a component from the screen:** Once you select the tag component instance, you'll see the available options on the screen. Choose one of them to continue.

<figure><img src="https://479678609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEfkN8oSQyQ4BaBzwxH-4037006485%2Fuploads%2FU1QEXhgmpV88bs7jpEYC%2FScreenshot%202024-04-30%20at%2017.08.00.png?alt=media&amp;token=ef0ccff0-0d39-46fb-bd28-459bb2cc2e82" alt=""><figcaption><p>Tag New Component Instance</p></figcaption></figure>

<figure><img src="https://479678609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEfkN8oSQyQ4BaBzwxH-4037006485%2Fuploads%2FPQubDa0gw3s08UF1S1qS%2FScreenshot%202024-04-30%20at%2017.08.33.png?alt=media&amp;token=4b2bca63-e3ed-455f-887b-5846a95a6364" alt=""><figcaption><p>Tag Component Instance Menu</p></figcaption></figure>

3. **Set properties:** For each layer, select the necessary properties such as title, image, or background image. These options will appear in a list.

<figure><img src="https://479678609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEfkN8oSQyQ4BaBzwxH-4037006485%2Fuploads%2F5rHgKAyFyznePAL41ubW%2FScreenshot%202024-04-30%20at%2017.09.27.png?alt=media&amp;token=ebfdfcbd-bcd6-41a5-af26-79f823441782" alt=""><figcaption><p>Property List</p></figcaption></figure>

4. **Name Your Variable:**  You will name your variable during this step. This name is used to reference your component in the code, choose a name that is easy to remember for you.
5. **Finish:** Click 'Finish' to complete the creation process.

Once the component is created successfully, you'll be able to see its code on the screen. Additionally, the component type will appear in the left layer list, highlighted on the screen, and the corresponding code on the right will be updated.

<figure><img src="https://479678609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEfkN8oSQyQ4BaBzwxH-4037006485%2Fuploads%2Fqq8jIeXET1pLAzbqfYD4%2FScreenshot%202024-04-30%20at%2017.12.54.png?alt=media&amp;token=1da2a0f5-36d9-42d3-9bac-e41f00c3762e" alt=""><figcaption><p>Elavated Button Created</p></figcaption></figure>

Please note that you need click 'Mark as Ready' button to see the code.

<figure><img src="https://479678609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEfkN8oSQyQ4BaBzwxH-4037006485%2Fuploads%2FI1Xu6zzLwsr0k85YHJDD%2FScreenshot%202024-04-30%20at%2017.12.34.png?alt=media&amp;token=806569f4-51ba-422a-b5cf-2630cce62a3a" alt=""><figcaption><p>Mark as Ready Button</p></figcaption></figure>

Congrats! It's done. You can also create your own [component library](/design-to-flutter/creating-components/custom-components) for reusing components.


# Views

Monday Hero can automatically understand the views, and convert design to Swift/Kotlin code.

A view expresses a single item on the user interface. It could be a shape like a rectangle, a control item such as a button, an input text field, or an image. A view is a defined specific area on the screen which can be configured to respond to touch events, or it can be used for enriching the user experience.

Monday Hero names **rectangles** and **ovals** on the design as **Views**. However, it's also possible to convert views into components like buttons or create Custom Views to group elements on the page like below:&#x20;

![Custom Views and a Button](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-Mc4mrUfZT4bJ53hd_Xa%2F-Mc4pWYlyjaYMn5JcWFt%2FGroup%20456.png?alt=media\&token=bf5e2da0-454d-4104-a624-30bce481e97e)

### Automatically Detected Views

On any design, rectangles and ovals are automatically detected as Views on Monday Hero. It's possible to use them as Views or convert them into components like buttons or create Custom Views to group them.&#x20;

As can be seen below, the **Follow** button has designed with a blue rectangle and text. Monday Hero automatically detected that the blue rectangle/background is a `View` and the text is a `Label`. &#x20;

![A View example.](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MRPbFMRmm2tXLR40A4Z%2F-MRZBwDmJZqvC9SxZGU2%2FScreen%20Shot%202021-01-21%20at%2012.08.22.png?alt=media\&token=6c750561-d66f-49d6-97dd-5eff2081985d)

The code will be generated like below and constraints are defined in the Storyboard file.&#x20;

{% tabs %}
{% tab title="iOS" %}

```swift
import UIKit

class ProfilePageViewController: UIViewController {
	
	// MARK: - Properties
	@IBOutlet private weak var rectangleView: UIView!

	override func viewDidLoad() {
		super.viewDidLoad()
		setupViews()
		setupLayout()
	}
}

extension ProfilePageViewController {
	private func setupViews() {

		rectangleView.layer.cornerRadius = 6
		rectangleView.layer.masksToBounds =  true 
		rectangleView.backgroundColor = UIColor.cloudBlue

	}

	private func setupLayout() { 
		//Constraints are defined in Storyboard file.
	}
}
```

{% endtab %}

{% tab title="Android" %}

```markup
<!--activity_profile_page.xml-->
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<androidx.constraintlayout.widget.ConstraintLayout
	xmlns:android="http://schemas.android.com/apk/res/android"
	xmlns:app="http://schemas.android.com/apk/res-auto"
	xmlns:tools="http://schemas.android.com/tools"
	android:layout_width="match_parent"
	android:layout_height="match_parent"
	tools:context=".ProfilePageActivity"
	android:background="?attr/daisy">
	
	<View
	android:id="@+id/containerView"
	android:layout_width="78dp"
	android:layout_height="26dp"
	android:background="@drawable/baseview_background_drawable"
	android:layout_marginEnd="56dp"
	android:layout_marginTop="42dp"
	android:layout_marginBottom="37dp"
	app:layout_constraintStart_toEndOf="@+id/profilPictureImageView"
	app:layout_constraintEnd_toEndOf="parent"
	app:layout_constraintTop_toBottomOf="@+id/nolanAlexTextView"
	app:layout_constraintBottom_toTopOf="@+id/alexanderNolanTextView"/>
	
</androidx.constraintlayout.widget.ConstraintLayout>
```

```markup
<!--Drawables/containerview_background_drawable.xml-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
  <item>
    <shape android:shape="rectangle">
      <solid android:color="?attr/cerulean"/>
      <corners android:radius="6dp"/>
    </shape>
  </item>
</selector>
```

{% endtab %}
{% endtabs %}

### Custom Views

In order to group elements on the page and reuse them on other pages, it's possible to create custom components. Here is how to do it:&#x20;

![Creating a Custom View](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-Mc4s803un4zYe5bU3AN%2F-Mc4x4pHCOVwdfdLqwnk%2FGroup%20459.png?alt=media\&token=ba985952-d353-47e1-b419-c566f210165c)

When it's done, you can see it on the components menu and you can get both pure and xib code in iOS:&#x20;

![Resuable View Code](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-Mc4s803un4zYe5bU3AN%2F-Mc4ygy3ULJsH9P-OgHp%2FGroup%20460.png?alt=media\&token=501eccff-2d0d-4f3f-a63b-16d4dfc11204)

&#x20;

The code will be generated like below:&#x20;

{% tabs %}
{% tab title="iOS" %}

```swift
import UIKit

class FormItemView: UIView {
	// MARK: - ContentView
	@IBOutlet weak var view: UIView!

	// MARK: - Properties
	@IBOutlet private weak var usernameLabel: UILabel!
	@IBOutlet private weak var emailTextField: FormTextField!

	// MARK: - Initializers
	override init(frame: CGRect) {
		super.init(frame: frame)
		initialize()
	}

	required init?(coder aDecoder: NSCoder) {
		super.init(coder: aDecoder)
		initialize()
	}

	init() {
		super.init(frame: .zero)
		initialize()
	}

	func initialize() {
		initializeNib()
		applyDefaultStyle()
	}

	func initializeNib() {
		Bundle.main.loadNibNamed(String(describing: type(of:self)), owner: self, options: nil)
		addSubview(view)
		view.frame = self.frame
		view.translatesAutoresizingMaskIntoConstraints = false
		NSLayoutConstraint.activate([
			self.leadingAnchor.constraint(equalTo: view.leadingAnchor, constant: 0),
			self.trailingAnchor.constraint(equalTo: view.trailingAnchor, constant: 0),
			self.topAnchor.constraint(equalTo: view.topAnchor, constant: 0),
			self.bottomAnchor.constraint(lessThanOrEqualTo: view.bottomAnchor, constant: 0),
		])
	}

	// MARK: - Styling
	func applyDefaultStyle() {

		usernameLabel.textColor = UIColor.black
		usernameLabel.numberOfLines = 0
		usernameLabel.font = UIFont.textStyle5
		usernameLabel.textAlignment = .left

		emailTextField.set(placeholder: NSLocalizedString("travel.lover", comment: ""))


	}

	func set(usernameLabelText: String, emailTextFieldPlaceholder: String){
		usernameLabel.text = usernameLabelText
		emailTextField.placeholder = emailTextFieldPlaceholder
	}

}
```

{% endtab %}
{% endtabs %}

You can also read and see how these Views become a component together. [You can check how to create a button component here.](broken://pages/-MJx5AsEB0Agv8t2oTjP)


# Texts

Monday Hero can automatically understand the texts, and convert design to Swift/Kotlin code.

Texts are automatically detected and their code is generated by Monday Hero. With texts, you can describe an interface element or provide messages. Texts display static text with no editing features.&#x20;

Monday Hero names **texts** on the design as **Labels**. However, it's also possible to convert label into components like buttons or create Custom Labels to reuse elements on the page like **HeaderLabel** below:&#x20;

![Automatically detected labels(Text) and components](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-Mc54b35lPlnnVpL5CPB%2F-Mc56mHcqucxlK9zf1Sc%2FGroup%20461.png?alt=media\&token=298a2264-57fb-48bf-bf99-8b2996122f08)

### Automatically Detected Texts

&#x20;In the image above, there is a **Welcome to Travel App** label. It's code is autogenerated like below.&#x20;

{% tabs %}
{% tab title="iOS" %}

## Label

Texts are called as `Label` in the Swift language. Let's see the generated code and its attributes.

```swift
//Signup Page, Welcome Label
import UIKit

class SignUpViewController: UIViewController {

	// MARK: - Properties
	@IBOutlet private weak var welcomeLabel: UILabel!

	override func viewDidLoad() {
		super.viewDidLoad()
		setupViews()
		setupLayout()
	}

}

extension SignUpViewController {
	private func setupViews() {

		welcomeLabel.textColor = UIColor.black
		welcomeLabel.numberOfLines = 0
		welcomeLabel.font = UIFont.textStyle7
		welcomeLabel.textAlignment = .center
		welcomeLabel.text = NSLocalizedString("welcome.to.travel.app", comment: "")

	}

	private func setupLayout() {
		//Constraints are defined in Storyboard file.
	}

}
```

{% endtab %}

{% tab title="Android" %}

## TextView

Texts are called as `TextView` in the Android Kotlin/Java XML. Let's see the already generated code and its attributes.

```markup
<!--activityExample.xml-->

	<TextView
	android:id="@+id/titleTextView"
	android:layout_width="0dp"
	android:layout_height="wrap_content"
	android:text="@string/title_text"
	style="@style/textStyle13"
	android:textAlignment="center"
	android:textColor="?attr/black"
	android:layout_marginStart="39dp"
	android:layout_marginEnd="39dp"
	android:layout_marginBottom="12dp"
	app:layout_constraintStart_toStartOf="parent"
	app:layout_constraintEnd_toEndOf="parent"
	app:layout_constraintTop_toBottomOf="@+id/mondayHeroLogoImageView"
	app:layout_constraintBottom_toTopOf="@+id/descriptionTextView"/>
	
```

```markup
<!--strings.xml-->
<string name="title_text">"SimpleText"</string>
<string name="description_text">"This is a textView example and textViews are better while it kept short and legible."</string>
```

{% endtab %}
{% endtabs %}

### Custom Texts

In order to reuse the same styled labels like header1, header2, create custom texts. Here is how to do it:&#x20;

![Create a reusable label](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-Mc5C1sC3ahg1gW0nGDi%2F-Mc5D8_PabMzDRfGR87L%2FGroup%20459.png?alt=media\&token=1c632701-a569-4cd5-b51d-2c78cb00acce)

The code will be generated like below for custom texts:

{% tabs %}
{% tab title="HeaderLabel.swift - iOS" %}

```swift
//HeaderLabel.swift

import UIKit

class HeaderLabel: UILabel {

	// MARK: - Initializers
	override init(frame: CGRect) {
		super.init(frame: frame)
		initialize()
	}

	required init?(coder aDecoder: NSCoder) {
		super.init(coder: aDecoder)
		initialize()
	}

	func initialize() {
		applyDefaultStyle()
	}

	// MARK: - Styling
	func applyDefaultStyle() {
		self.textColor = UIColor.pebble
		self.numberOfLines = 0
		self.font = UIFont.textStyle18
		self.textAlignment = .left
	}

	func set(text: String){
		self.text = text
	}

}
```

{% endtab %}

{% tab title="SignupPage.swift - iOS" %}

```swift
import UIKit

class SignupPage: UIViewController {

	// MARK: - Properties
	@IBOutlet private weak var welcomeLabel: HeaderLabel!

	override func viewDidLoad() {
		super.viewDidLoad()
		setupViews()
		setupLayout()
	}

}

extension SignupPage {
	private func setupViews() {

		welcomeLabel.set(text: NSLocalizedString("welcome.to.travel.app", comment: ""))

	}

	private func setupLayout() {
		//Constraints are defined in Storyboard file.
	}

}

```

{% endtab %}

{% tab title="Android" %}
Coming soon.
{% endtab %}
{% endtabs %}


# Images

Monday Hero can automatically understand the images, and convert design to Swift/Kotlin code.

Images can be used to improve the UX, capture users' attention, or differentiate the product. ImageViews are non-interactive by default. Images in the designs are automatically detected after exporting. They are saved as assets, and their code is generated by Monday Hero. Icons and logos are also classified as images. Let's have an example and understand it clearly. A simple image, an icon, a logo, and their generated codes can be seen below. &#x20;

![Images, icon, and logo example.](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-ML7eoJNXnSj7CuGYgY_%2F-ML7iI9Vu3pWRnFKaWvP%2Fimage-icon-logo-code-generation-monday-hero.png?alt=media\&token=c6c13e85-cffc-4177-b5e1-0fb733aa2d15)

{% hint style="danger" %}
All images, logos, and icons **should be marked exportable** before exporting the design to Monday Hero with plugins. Otherwise, the code and assets are not generated for them. [Click and read here to learn more and see examples.](/getting-started/design-handoff-to-ios-android-developer)
{% endhint %}

### Generated iOS/Android Code of Images

Images are called and defined in `ImageView` to display image resources in both Swift/XML/Kotlin language. Let's see the generated code and its attributes.

{% tabs %}
{% tab title="iOS" %}
In iOS, Images are connected to the builder and there is no additional code below since the constraints are already defined in the storyboard file automatically.

```swift
//ListPageViewController.swift 
import UIKit

class ListPageViewController: UIViewController {
	
	// MARK: - Properties
  //Connection from an Interface Builder to a UI component
	@IBOutlet private weak var photoImageView: UIImageView!
	@IBOutlet private weak var iconImageView: UIImageView!
	@IBOutlet private weak var logoImageView: UIImageView!


	override func viewDidLoad() {
		super.viewDidLoad()
		setupViews()
		setupLayout()
	}
}

extension ListPageViewController {
	private func setupViews() {

	}

	private func setupLayout() { 
		//Constraints are defined in Storyboard file.
	}
}
```

{% endtab %}

{% tab title="Android" %}
In Android, the source, layout, constraints, etc. all generated automatically as can be seen below.

```markup
<!--activityExample.xml-->
<androidx.constraintlayout.widget.ConstraintLayout
	xmlns:android="http://schemas.android.com/apk/res/android"
	xmlns:app="http://schemas.android.com/apk/res-auto"
	xmlns:tools="http://schemas.android.com/tools"
	android:layout_width="match_parent"
	android:layout_height="match_parent"
	tools:context=".ListPageActivity"
	android:background="?attr/daisy">
	
	<ImageView
	android:id="@+id/photoImageView"
	android:layout_width="0dp"
	android:layout_height="wrap_content"
	android:src="@drawable/photo2"
	android:scaleType="centerCrop"
	android:layout_marginStart="20dp"
	android:layout_marginEnd="20dp"
	android:layout_marginBottom="13dp"
	app:layout_constraintStart_toStartOf="parent"
	app:layout_constraintEnd_toEndOf="parent"
	app:layout_constraintTop_toBottomOf="@+id/popularTextView"
	app:layout_constraintBottom_toTopOf="@+id/rosieDelTextView"/>
	
	<ImageView
	android:id="@+id/iconImageView"
	android:layout_width="wrap_content"
	android:layout_height="wrap_content"
	android:src="@drawable/icon"
	android:layout_marginEnd="19dp"
	android:layout_marginTop="14dp"
	android:layout_marginBottom="20dp"
	app:layout_constraintStart_toEndOf="@+id/likesTextView"
	app:layout_constraintEnd_toEndOf="parent"
	app:layout_constraintTop_toBottomOf="@+id/photoImageView2"
	app:layout_constraintBottom_toTopOf="@+id/photoImageView"/>
	
	<ImageView
	android:id="@+id/logoImageView"
	android:layout_width="0dp"
	android:layout_height="wrap_content"
	android:src="@drawable/logo"
	android:layout_marginTop="267dp"
	android:layout_marginBottom="211dp"
	app:layout_constraintStart_toStartOf="parent"
	app:layout_constraintEnd_toEndOf="parent"
	app:layout_constraintTop_toTopOf="parent"
	app:layout_constraintBottom_toTopOf="@+id/copyrightTextView"/>
	
</androidx.constraintlayout.widget.ConstraintLayout>
```

{% endtab %}
{% endtabs %}


# Button

Convert Button component to Android/iOS code.

Buttons are the most used components in apps and they have app-specific actions. Buttons can have a **title, background,** or **image** as property/clas&#x73;**.** They may include more than one property. A button can have both properties at the same time. For example, background and title, or title and image, etc.

You can convert rectangles, images and texts in your design into buttons on Monday Hero. All you need to do tagging the elements with the properties. They are already automatically selected by Monday Hero, incase it tags properties wrong you can reselect them anytime. Here are some button examples with the properties:

![Button Examples](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEfkN8oSQyQ4BaBzwxH-4037006485%2Fuploads%2FGfVGrSZ3sjgRnnauHtJ0%2FButton%20Examples.png?alt=media\&token=dc57577e-cc1a-4ecb-9304-2e38e8aba737)

Buttons have 3 properties in Monday Hero:

**Title:** The text displayed over the button.&#x20;

**Background:** It's the background of the button. It can be either an image or it can be a view like a rectangle.

**Image:** Icons are good examples of image buttons. They designed for having app-specific actions.

Here is another button example below. In this case, Monday Hero automatically understands the blue rectangle as View and gets background color from the rectangle. So, tagging the "Follow" text as the **Title** and the rectangle as **Background** will be enough. How to create a button and add a property/class can be seen in the GIF below.

![Example of button creation that has a title in Monday Hero.](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MRPbFMRmm2tXLR40A4Z%2F-MRUJFfwyPKSuoKhzgt8%2FCreate-button-new-19-compressed.gif?alt=media\&token=584ea30a-ddfe-4f6c-a440-41fa89f896ab)

When the button is created, the generated code will be like below.

### Generated iOS/Android Code

{% tabs %}
{% tab title="iOS" %}
The button code created is added to the page with the styles. Constraints are defined in the Storyboard file.

```swift
//ProfilePageViewController.swift
import UIKit

class ProfilePageViewController: UIViewController {
	
	// MARK: - Properties
  //Connection from an Interface Builder to a UI component
  
  // The button with an image and text
	@IBOutlet private weak var followButton: UIButton!
	@IBOutlet private weak var buttonImageView: UIImageView!
	
	//Button with an only image
	@IBOutlet private weak var profileButton: UIButton!

 	//Button with a text and background image
  @IBOutlet private weak var loginButton: UIButton!
  
	override func viewDidLoad() {
		super.viewDidLoad()
		setupViews()
		setupLayout()
	}
}

extension ProfilePageViewController {
	private func setupViews() {
		
		// The button with an image and text
		followButton.layer.cornerRadius = 6
		followButton.layer.masksToBounds =  true 
		followButton.backgroundColor = UIColor.cerulean
		followButton.setTitle(NSLocalizedString("follow", comment: ""),for: .normal)
		followButton.setTitleColor(UIColor.daisy, for: .normal)
		followButton.titleLabel?.font = UIFont.textStyle7
		followButton.contentHorizontalAlignment = .leading 
		followButton.contentEdgeInsets = UIEdgeInsets(top: 6, left: 9 , bottom: 6, right: 9)

		//Button with an only image
		profileButton.setImage(UIImage(named: "profileIcon") , for: .normal)
		
		//Button with a text and background image
		loginButton.setTitle(NSLocalizedString("login", comment: ""),for: .normal)
		loginButton.setTitleColor(UIColor.white, for: .normal)
		loginButton.titleLabel?.font = UIFont.textStyle2
		loginButton.contentHorizontalAlignment = .center 
		loginButton.setBackgroundImage(UIImage(named: "loginBackground") , for: .normal)
	}

	private func setupLayout() { 
		//Constraints are defined in Storyboard file.
	}
}

```

{% endtab %}

{% tab title="Android" %}
The button code created and added to the page with the styles. &#x20;

{% hint style="warning" %}
⚠️This feature is available in **only Mac App**. Web App support for Android is coming soon.\
If you need to install the desktop app, [click here.](/getting-started/install-app-and-plugin)
{% endhint %}

```markup
<!--activityUserProfile.xml-->
<!--The button with a background color and text-->
<Button
	android:id="@+id/followButton"
	android:layout_width="match_parent"
	android:layout_height="wrap_content"
	android:text="@string/follow"
	android:textAllCaps="false"
	android:background="@drawable/followbutton_background_drawable"
	style="@style/textStyle11"
	android:textAlignment="textStart"
	android:textColor="?attr/daisy"
	android:paddingLeft="9dp"
	android:paddingRight="9dp"
	android:paddingTop="6dp"
	android:paddingBottom="6dp"
	android:layout_marginEnd="56dp"
	android:layout_marginTop="42dp"
	android:layout_marginBottom="37dp"
	app:layout_constraintStart_toEndOf="@+id/profilPictureImageView"
	app:layout_constraintEnd_toEndOf="parent"
	app:layout_constraintTop_toBottomOf="@+id/nolanAlexTextView"
	app:layout_constraintBottom_toTopOf="@+id/alexanderNolanTextView"/>
	
<!--Button with an only image-->	
<Button
	android:id="@+id/profileButton"
	android:layout_width="wrap_content"
	android:layout_height="wrap_content"
	android:textAllCaps="false"
	android:background="@android:color/transparent"
	android:drawableBottom="@drawable/profileicon"
	android:layout_marginEnd="23dp"
	android:layout_marginBottom="13dp"
	app:layout_constraintStart_toEndOf="@+id/buttonImageView"
	app:layout_constraintEnd_toEndOf="@+id/baseView"
	app:layout_constraintTop_toBottomOf="@+id/userPicturesBID"
	app:layout_constraintBottom_toBottomOf="@+id/baseView"/>

<!--Button with a text and background image -->
<Button
	android:id="@+id/loginButton"
	android:layout_width="0dp"
	android:layout_height="wrap_content"
	android:text="@string/login"
	android:textAllCaps="false"
	android:background="@android:color/transparent"
	style="@style/textStyle15"
	android:textAlignment="center"
	android:textColor="?attr/white"
	android:layout_marginStart="108dp"
	android:layout_marginEnd="86dp"
	android:layout_marginBottom="18dp"
	app:layout_constraintStart_toStartOf="parent"
	app:layout_constraintEnd_toEndOf="parent"
	app:layout_constraintTop_toBottomOf="@+id/rectangleView"
	app:layout_constraintBottom_toBottomOf="parent"/>
```

```markup
<!--Drawables/followbutton_background_drawable.xml-->
<!--The button with a background color and text-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
  <item>
    <shape android:shape="rectangle">
      <solid android:color="?attr/cerulean"/>
      <corners android:radius="6dp"/>
    </shape>
  </item>
</selector>
```

{% endtab %}
{% endtabs %}

That's all for creating buttons on Monday Hero.


# TextField/EditText

Convert TextField/EditText component to Android/iOS code.

TextField in Swift and EditText in Kotlin is generally used for form pages. It's generally used for the user to enter the email and password like in the images below. TextFields have different names and properties in iOS and Android, they're explained below.

### Examples of Components

![TextField component example.](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MS36IByj9NhkNkmEyns%2F-MS3E-qUk1rTUSNa5xTl%2Ftextfield-design-to-code.png?alt=media\&token=43a26622-1129-4900-8e37-1757f12c6d8c)

{% tabs %}
{% tab title="iOS" %}

## TextField

TextFields have 4 properties in Monday Hero :&#x20;

**Text:** The initial text displayed by the text field. You can specify the text as a plain string or as an attributed string.

**Placeholder:** A placeholder is a text displayed by the textField when the string is empty. Typing any text into the text field hides this string.&#x20;

**Left icon:** You can add an icon to the left side of the textField.&#x20;

**Right icon:** You can add an icon to the right side of the textField.&#x20;
{% endtab %}

{% tab title="Android" %}

## Edit Text

{% hint style="warning" %}
⚠️This feature is available in **only Mac App**. Web App support for Android is coming soon.\
If you need to install the desktop app, [click here.](/getting-started/install-app-and-plugin)
{% endhint %}

`EditText`is used for entering and modifying text.

Additionally, Monday Hero also lets you select and generate 3 attributes of this component:\
**Text:** The initial text displayed by the text field. You can specify the text as a plain string or as an attributed string.\
**Hint:** A hint is a text displayed by the `EditText` when the string is empty. Typing any text into the text field hides this string. \
**Left icon:** You can add an icon to the left side of the `EditText`.&#x20;
{% endtab %}
{% endtabs %}

### Generated iOS/Android code

{% tabs %}
{% tab title="iOS" %}
Let's see the code that generated for the e-mail `textField`.

```swift
//SignInViewController.swift
import UIKit

class SignInViewController: UIViewController {

//Connection from an Interface Builder to a UI component
@IBOutlet private weak var emailTextField: UITextField!

	override func viewDidLoad() {
		super.viewDidLoad()
		setupViews()
	}
}

extension SignInViewController {
	private func setupViews() {
	
		//TextField properties
		emailTextField.layer.borderColor = UIColor.salt.cgColor
		emailTextField.layer.borderWidth =  1
		emailTextField.layer.cornerRadius = 21.5
		emailTextField.layer.masksToBounds =  true 
		emailTextField.backgroundColor = UIColor.daisy
		emailTextField.placeholder = NSLocalizedString("email", comment: "")
		emailTextField.textColor = UIColor.indigo
		emailTextField.font = UIFont.textStyle5
		emailTextField.textAlignment = .left 
		emailTextField.setLeftView(leftViewFrame : CGRect(x: 0, y: 0, width: 22, height: 43))
	
	}		
}
```

{% endtab %}

{% tab title="Android" %}
Let's see the generated code for `EditText`. You can also see the layout constraints.

{% hint style="warning" %}
⚠️This feature is available in **only Mac App**. Web App support for Android is coming soon.\
If you need to install the desktop app, [click here.](/getting-started/install-app-and-plugin)
{% endhint %}

```markup
!--activityLogin.xml-->
<EditText
	android:id="@+id/email"
	android:layout_width="0dp"
	android:layout_height="wrap_content"
	android:background="@drawable/email_background_drawable"
	style="@style/textStyle"
	android:text="@string/email"
	android:gravity="left|center"
	android:textColor="?attr/indigo"
	android:textColorHint="?attr/indigo"
	android:paddingLeft="22dp"
	android:paddingRight="22dp"
	android:layout_marginStart="39dp"
	android:layout_marginEnd="38dp"
	android:layout_marginBottom="21dp"
	app:layout_constraintStart_toStartOf="parent"
	app:layout_constraintEnd_toEndOf="parent"
	app:layout_constraintTop_toBottomOf="@+id/halfBackground"
	app:layout_constraintBottom_toTopOf="@+id/password"/>
```

```markup
<!--Drawables/email_background_drawable.xml-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
  <item>
    <shape android:shape="rectangle">
      <solid android:color="?attr/daisy"/>
      <stroke android:width="1dp" android:color="?attr/salt"/>
      <corners android:radius="21dp"/>
    </shape>
  </item>
</selector>
```

{% endtab %}
{% endtabs %}

You can do further edit/configurations in your IDE after you export it.


# Text Area

Convert TextView/Text component to iOS/Android code.

Text View allows the user to enter **more than one line** of text. A textView image is and its code is shown below.

![A Text View Example](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MGrIvvQkqS1zsILEfc7%2F-MGsAY-is6wUB907gj3K%2FGroup%2011.png?alt=media\&token=993d38ec-7fa5-4620-bc28-f150cf268f8a)

While creating the component, Monday Hero automatically detects the **text** and **Background** in the TextView.&#x20;

![](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MS36IByj9NhkNkmEyns%2F-MS3GAuaKlMNub0-OuLN%2FtextView-design-to-code.png?alt=media\&token=ece95fb9-0581-4ff5-82fa-0940faf034bd)

### Generated iOS/Android Code of TextView

{% tabs %}
{% tab title="iOS" %}

```swift
//HomePageViewController.swift 
import UIKit

class HomePageViewController: UIViewController {

//Connection from an Interface Builder to a UI component
@IBOutlet private weak var addNotesTextView: UITextView!

	override func viewDidLoad() {
		super.viewDidLoad()
		setupViews()
	}
}

extension HomePageViewController {
	private func setupViews() {
		//TextView properties
		addNotesTextView.backgroundColor = UIColor.daisy2
		addNotesTextView.text = NSLocalizedString("add.note.here", comment: "")
		addNotesTextView.textColor = UIColor.spruce_40
		addNotesTextView.font = UIFont.textStyle5
		addNotesTextView.textAlignment = .left
			}
}		
```

{% endtab %}

{% tab title="Android" %}
Android does not have a separate component for Text Areas, the same code is used for the [Texts](broken://pages/-MKAkeUaR98eGvVIsvk-) are also used for Text Areas.&#x20;

{% content-ref url="/pages/-MKAkeUaR98eGvVIsvk-" %}
[Broken mention](broken://pages/-MKAkeUaR98eGvVIsvk-)
{% endcontent-ref %}
{% endtab %}
{% endtabs %}


# Status Bar

Status Bar design in Adobe XD/Sketch should be removed, projects should use a system-provided status bar.

When you have a Status Bar in the design, you can convert it to a Status Bar component to prevent its generation in your code. Mobile users expect the status bar to be consistent systemwide so you should use a system-provided status bar. You can do your edits/configuration after you export your project.

![The Status Bar shouldn't be in the design.](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MGsXmoEr6fQRBjxagGX%2F-MGxAhu2fVs1u9jQEszc%2FArtboard.png?alt=media\&token=9c398467-871f-4fab-aad0-eddaa238de65)

### Resources for iOS and Android Developers

{% hint style="info" %}
&#x20;You can see the recommended use of StatusBar for Swift in **developer.apple.com** [here](https://developer.apple.com/design/human-interface-guidelines/ios/bars/status-bars/) and for Android, **developer.android.com** [here](https://developer.android.com/training/system-ui).
{% endhint %}


# Search Bar

Convert Search Bar component to iOS/Android code.

A search bar allows users to search values by typing text into a field.&#x20;

![](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MKoiOYms5cxc9s7YGQK%2F-MKokCwgbhlqJ83gQjCE%2Fplaceholder.png?alt=media\&token=907e2f50-7fea-49ee-a0e7-37dfb13d302f)

### Component's Property info for iOS/Android

{% tabs %}
{% tab title="iOS" %}
It's called`SearchBar` in Swift language. It can have 2 properties on Monday Hero:&#x20;

\
**Text:** The initial text displayed by the text field. You can specify the text as a plain string or as an attributed string.\
**Placeholder:** A placeholder is a text displayed by the SearchBar when the string is empty. Typing any text into the text field hides this string.&#x20;
{% endtab %}

{% tab title="Android" %}
Searchbar is called`searchView`in Android and has `hint`property on Monday Hero.

{% hint style="warning" %}
⚠️This feature is available in **only Mac App**. Web App **support for Android** is coming soon.\
If you need to install the desktop app, [click here.](/getting-started/install-app-and-plugin)
{% endhint %}

\
**`Hint`:** A hint is a text displayed by the searchView when the string is empty. Typing any text into the text field hides this string. It's called the placeholder in iOS.
{% endtab %}
{% endtabs %}

### Generated iOS/Android Code

Let's see the generated code. Monday Hero will generate it even the rectangle's `cornerRadius` value included.

{% tabs %}
{% tab title="iOS" %}

```swift
//HomePageViewController.swift 
import UIKit

class HomePageViewController: UIViewController {

//Connection from an Interface Builder to a UI component
@IBOutlet private weak var searchSongSearchBar: UISearchBar!

	override func viewDidLoad() {
		super.viewDidLoad()
		setupViews()
	}
}

extension HomePageViewController {
	private func setupViews() {
	
		//SearchBar properties
		searchSongSearchBar.layer.cornerRadius = 10
		searchSongSearchBar.layer.masksToBounds =  true 
		searchSongSearchBar.setBackgroundImage(UIImage(), for: .any, barMetrics: .default)
		searchSongSearchBar.placeholder = NSLocalizedString("search", comment: "")
		if let placeholderInsidesearchSongSearchBar = searchSongSearchBar.value(forKey: "searchField") as? UITextField {
					placeholderInsidesearchSongSearchBar.textColor = UIColor.flint
					placeholderInsidesearchSongSearchBar.font = UIFont.textStyle
					placeholderInsidesearchSongSearchBar.textAlignment = .left 
		}
	}
}	
```

{% endtab %}

{% tab title="Android" %}

```markup
<!--activitySongList.xml-->
<SearchView
	android:id="@+id/songSearchView"
	android:layout_width="0dp"
	android:layout_height="wrap_content"
	android:iconifiedByDefault="false"
	android:queryBackground="@android:color/transparent"
	android:queryHint="@string/search"
	android:textAlignment="textStart"
	android:textColor="?attr/flint"
	android:layout_marginStart="20dp"
	android:layout_marginEnd="19dp"
	android:layout_marginBottom="8dp"
	app:layout_constraintStart_toStartOf="parent"
	app:layout_constraintEnd_toEndOf="parent"
	app:layout_constraintTop_toBottomOf="@+id/descriptionTextView"
	app:layout_constraintBottom_toTopOf="@+id/itemBackgroundView"/>
```

{% endtab %}
{% endtabs %}


# List

Convert the List design to iOS/Android code.

If you need to display scrolling elements dynamically, you should check if they are lists or [grids](broken://pages/-MJxGXyqadXM5rCzXVzt). Lists are vertical, and grids can be vertical or horizontal. In lists, only 1 cell can be in a column but for Grids, it can be more than 1 cell in a column. Here is an example of both of them:

![Lists and Grids](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MKpDF6Xgwb_Z7dwqXur%2F-MKpE6OolHScNdfLNTPX%2Flists%20and%20grids.png?alt=media\&token=b789979e-27f8-43d8-88a7-a80c1792cec9)

This page is created for lists.&#x20;

If you need to display scrolling elements dynamically, you should check if they are lists or [grids](broken://pages/-MJxGXyqadXM5rCzXVzt). You can find [how to understand the difference here](broken://pages/-MKphJRaRVi1rwvhK2Zo). If you have decided that you want to create lists, this is the right place to read.

An example of a list is below. In the image, the cell prototype repeats itself with different data inside.&#x20;

Lists are called different names in iOS and Android. They are explained below with the code and details.&#x20;

![List Example.](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MS36IByj9NhkNkmEyns%2F-MS3KwH_gZJZLAEIy45F%2FlistView-design-to-code.png?alt=media\&token=20882f83-f03f-4c31-a48e-9e9a5a6d286c)

![List creation GIF.](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MT-NklPruWUNAc5HnfU%2F-MT-NrdwIR5cMsJCdQuv%2Flist-gif.gif?alt=media\&token=ebfd5f23-0c04-47c8-9caa-66072aa05b19)

### Generated code for iOS/Android and Details

{% tabs %}
{% tab title="iOS" %}

## TableView

Lists are called in`TableView` Swift language. With `TableView`, you can view a group that aligns all children in a single direction. In`TableView`, no matter how wide they are, the vertical list has only one child per row, and your list will only be the one-row height(Height of the tallest child + padding).

`CellPrototype`wraps a layout and will often be the container used in a layout for each item within a `TableView`. Let's check the generated code.

TableView is added to the page's View Controller file.&#x20;

{% code title="ListPageViewController.swift " %}

```swift
import UIKit

class ListPageViewController: UIViewController {

//Connection from an Interface Builder to a UI component
@IBOutlet private weak var explorePostsTableView: UITableView!

	override func viewDidLoad() {
		super.viewDidLoad()
		setupViews()
	}
}

extension ListPageViewController {
	private func setupViews() {
	
		//TableView properties
		self.explorePostsTableView.rowHeight = UITableView.automaticDimension
		self.explorePostsTableView.estimatedRowHeight = 30
		self.explorePostsTableView.dataSource = self	

	}
	
}		

// MARK: - Table View DataSource

extension ListPageViewController: UITableViewDataSource {
	func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
		return 1
	}

	func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
		let cell = tableView.dequeueReusableCell(withIdentifier: "ExplorePostTableViewCell") as! ExplorePostTableViewCell
		return cell
	}
}
```

{% endcode %}

The Cell is added as a separate file.&#x20;

{% code title="ExplorePostsTableViewCell.swift" %}

```swift

import UIKit
import SnapKit

class ExplorePost: UITableViewCell {
	
	// MARK: - Properties
	@IBOutlet private weak var photoImageView2: UIImageView!
	@IBOutlet private weak var rosieDelLabel: UILabel!
	@IBOutlet private weak var likesLabel: UILabel!
	@IBOutlet private weak var heartLikedImageView: UIImageView!

	override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
		super.init(style: style, reuseIdentifier: reuseIdentifier)
		self.setupViews()
	}

	required init?(coder aDecoder: NSCoder) {
		super.init(coder: aDecoder)
	}

	func setupViews() {
		
		rosieDelLabel.text = NSLocalizedString("rosie.del", comment: "")
		rosieDelLabel.textColor = UIColor.porpoise
		rosieDelLabel.numberOfLines = 0
		rosieDelLabel.font = UIFont.textStyle2
		rosieDelLabel.textAlignment = .left

		likesLabel.text = NSLocalizedString(".likes2", comment: "")
		likesLabel.textColor = UIColor.anchor2
		likesLabel.numberOfLines = 0
		likesLabel.font = UIFont.textStyle6
		likesLabel.textAlignment = .right

	}
}
```

{% endcode %}
{% endtab %}

{% tab title="Android" %}

## RecyclerView-LinearLayoutManager

{% hint style="warning" %}
⚠️This feature is available in **only Mac App**. Web App **support for Android** is coming soon.\
If you need to install the desktop app, [click here.](/getting-started/install-app-and-plugin)
{% endhint %}

In Android lists are used with `RecyclerView`and`LinearLayout`. The repetitive cells are `CardView`&#x20;

With `LinearLayout`, you can view a group that aligns all children in a single direction. In`LinearLayout`, no matter how wide they are, the vertical list has only one child per row, and your list will only be the one-row height(Height of the tallest child + padding).

![Android RecyclerView and CardView](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MHFANrCOC6gc2K7q24z%2F-MHFQG7NhUfspOqdnQSq%2Fimage.png?alt=media\&token=157242b8-3443-40ce-9101-1ac3ff968014)

`CardView` wraps a layout and will often be the container used in a layout for each item within a `RecyclerView`. Let's check the generated code.

```markup
<!--activityListPage.xml-->
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/explorePicturesRecyclerView"
android:layout_width="0dp"
android:layout_height="0dp"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
tools:listitem="@layout/layout_explore_post_card_view"
android:layout_marginStart="20dp"
android:layout_marginEnd="19dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/popularTextView"
app:layout_constraintBottom_toBottomOf="parent"/>
```

```markup
<!--LayoutExplorePhotoCardView.xml-->
<androidx.cardview.widget.CardView
	xmlns:android="http://schemas.android.com/apk/res/android"
	xmlns:app="http://schemas.android.com/apk/res-auto"
	xmlns:tools="http://schemas.android.com/tools"
	android:layout_width="match_parent"
	android:layout_height="wrap_content">
	
	<androidx.constraintlayout.widget.ConstraintLayout
	android:layout_width="match_parent"
	android:layout_height="wrap_content">
	
	<ImageView
	android:id="@+id/photoImageView"
	android:layout_width="0dp"
	android:layout_height="wrap_content"
	android:src="@drawable/photo"
	android:scaleType="centerCrop"
	android:layout_marginEnd="0dp"
	android:layout_marginBottom="13dp"
	app:layout_constraintStart_toStartOf="parent"
	app:layout_constraintEnd_toEndOf="parent"
	app:layout_constraintTop_toTopOf="parent"
	app:layout_constraintBottom_toTopOf="@+id/rosieDelTextView"/>
	
	<TextView
	android:id="@+id/rosieDelTextView"
	android:layout_width="0dp"
	android:layout_height="wrap_content"
	android:text="@string/rosie_del"
	style="@style/textStyle2"
	android:textAlignment="textStart"
	android:textColor="?attr/porpoise"
	android:layout_marginEnd="8dp"
	app:layout_constraintStart_toStartOf="parent"
	app:layout_constraintEnd_toStartOf="@+id/likesTextView"
	app:layout_constraintTop_toBottomOf="@+id/photoImageView"
	app:layout_constraintBottom_toBottomOf="parent"/>
	
	<TextView
	android:id="@+id/likesTextView"
	android:layout_width="wrap_content"
	android:layout_height="wrap_content"
	android:text="@string/_likes"
	style="@style/textStyle6"
	android:textAlignment="textEnd"
	android:textColor="?attr/anchor2"
	android:layout_marginEnd="8dp"
	android:layout_marginTop="13dp"
	app:layout_constraintStart_toEndOf="@+id/rosieDelTextView"
	app:layout_constraintEnd_toStartOf="@+id/heartLikedImageView"
	app:layout_constraintTop_toBottomOf="@+id/photoImageView"
	app:layout_constraintBottom_toBottomOf="parent"/>
	
	<ImageView
	android:id="@+id/heartLikedImageView"
	android:layout_width="wrap_content"
	android:layout_height="wrap_content"
	android:src="@drawable/heartliked"
	android:layout_marginTop="14dp"
	android:layout_marginBottom="1dp"
	app:layout_constraintStart_toEndOf="@+id/likesTextView"
	app:layout_constraintEnd_toEndOf="parent"
	app:layout_constraintTop_toBottomOf="@+id/photoImageView"
	app:layout_constraintBottom_toBottomOf="parent"/>
	
	</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.cardview.widget.CardView>
```

{% endtab %}
{% endtabs %}


# Grid

Convert the Grid design to iOS/Android code.

If you need to display scrolling elements dynamically, you should check if they are lists or [grids](broken://pages/-MJxGXyqadXM5rCzXVzt). Lists are vertical, and grids can be vertical or horizontal. In lists, only 1 cell can be in a column but for Grids, it can be more than 1 cell in a column. Here is an example of both of them:

![Lists and Grids](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MKpDF6Xgwb_Z7dwqXur%2F-MKpE6OolHScNdfLNTPX%2Flists%20and%20grids.png?alt=media\&token=b789979e-27f8-43d8-88a7-a80c1792cec9)

This page is created for grids.&#x20;

If you need to display scrolling elements dynamically, you should check if they are [lists](broken://pages/-MJxGU4JDa7NNKRIg-Np) or grids. You can find [how to understand the difference here](broken://pages/-MKphJRaRVi1rwvhK2Zo). If you have decided that you want to create Grids, this is the right place to read.

An example of a grid is below. In the image, the cell prototype repeats itself with different data inside.&#x20;

![](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MS36IByj9NhkNkmEyns%2F-MS3OFuWKuvZNiTtZc6A%2FcollectionView-design-to-code.png?alt=media\&token=5a1bd945-0b80-4aa2-8fe1-ba3d60eba494)

Grids have different names in iOS and Android. Grids are explained below with the code and details.

### Generated code for iOS/Android and Details

{% tabs %}
{% tab title="iOS" %}

## CollectionView (Horizontal / Vertical)&#x20;

A grid is called `CollectionView` in Swift language.

A CollectionView object is responsible for managing an ordered collection of data items and presenting them in customizable layouts.

It has two directions as **Vertical** and **Horizontal**. You can select the one that fits your case. In the case below, you can see the CollectionView-Vertical and its generated code.

![CollectionView example.](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MS7DcoKkbIjCnGEXzcr%2F-MS7Q-Cu1kxQQGNpk-w1%2Fgrid-high-quality.gif?alt=media\&token=5be8a559-9650-4f98-b24c-f1f1251cac6d)

{% code title="ProfilePage.swift" %}

```swift
import UIKit

class ProfilePage: UIViewController {
	
//Connection from an Interface Builder to a UI component
@IBOutlet private weak var userPhotosCollectionView: UICollectionView!

		override func viewDidLoad() {
			super.viewDidLoad()
			setupViews()
	}

	private func setupViews() {
		userPhotosCollectionView.backgroundColor = UIColor.clear
		self.userPhotosCollectionView.dataSource = self
		}
}

// MARK: - Collection View DataSource

extension ProfilePage: UICollectionViewDataSource {
	func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int{
		return 10
	}

	func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell{
        
		let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "PictureCollectionViewCell", for: indexPath) as! PictureCollectionViewCell
		return cell
	}
}
```

{% endcode %}

The cell is defined in a separate file.

{% code title="PictureCollectionViewCell.swift" %}

```swift
import UIKit

class PictureCollectionViewCell: UICollectionViewCell {
	
	// MARK: - Properties

	@IBOutlet private weak var pic03ImageView: UIImageView!

    
	override init(frame: CGRect) {
		super.init(frame: frame)
		self.setupViews()
	}

	required init?(coder aDecoder: NSCoder) {
		super.init(coder: aDecoder)
	}

	func setupViews() {
		//The properties of the code are defined in Storyboard. 
	}
}
```

{% endcode %}
{% endtab %}

{% tab title="Android" %}

## RecyclerView-GridLayoutManager

{% hint style="warning" %}
⚠️This feature is available in **only Mac App**. Web App **support for Android** is coming soon.\
If you need to install the desktop app, [click here.](/getting-started/install-app-and-plugin)
{% endhint %}

`GridLayoutManager` is the `RecyclerView.LayoutManager` implementation that shows items in a grid. It is responsible for managing an ordered collection of data items and presenting them in customizable layouts.

It has two directions as **Vertical** and **Horizontal**. You can select the one that fits your case. In the case below, you can see the GridLayoutManager-Vertical and its generated code.

![](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MHFANrCOC6gc2K7q24z%2F-MHFWG4XSYcqtuCWjoZz%2Fimage.png?alt=media\&token=3424f664-58a6-40f3-bbd1-07940b0e3372)

Let's see the generated code for `GridLayoutManager`.

```markup
<!--activityProfilePage.xml-->
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/userPicturesRecyclerView"
android:layout_width="0dp"
android:layout_height="0dp"
android:background="@drawable/userpicturesrecyclerview_background_drawable"
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
tools:listitem="@layout/layout_user_picture_card_view"
app:spanCount="3"
android:orientation="vertical"
android:layout_marginStart="20dp"
android:layout_marginEnd="20dp"
android:layout_marginBottom="1dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/photosTextView"
app:layout_constraintBottom_toTopOf="@+id/profileIconImageView"/>
```

The card is defined in a separate file.

```markup
<!--layoutUserPictureCardView.xml-->
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">
	
<ImageView
android:id="@+id/pic03ImageView"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:src="@drawable/pic04"
android:scaleType="centerCrop"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"/>
	
</androidx.constraintlayout.widget.ConstraintLayout>

```

{% endtab %}
{% endtabs %}


# Swift Supported Components

In this section, we'll take a look at which iOS components are supported or not in Monday Hero.

Monday Hero helps product teams to get all of the static code components in your app so because apps are 80% static. Supported components can be used in the Monday Hero app to get functional UI component code, and you can add any other code on top of it to create your custom and fully functional app.&#x20;

The following table shows a complete list of iOS components,  and you can find supported components below.&#x20;

<table><thead><tr><th width="246">Type</th><th>Name</th></tr></thead><tbody><tr><td><strong>Content</strong></td><td>View</td></tr><tr><td></td><td>Image View</td></tr><tr><td></td><td>Text View</td></tr><tr><td></td><td>Monday Hero Video Player</td></tr><tr><td><strong>Layout &#x26; Organization</strong></td><td>Label</td></tr><tr><td></td><td>List</td></tr><tr><td></td><td>CollectionView </td></tr><tr><td><strong>Menu &#x26; Action</strong></td><td>Button</td></tr><tr><td><strong>Navigation &#x26; Search</strong></td><td>Search Field</td></tr><tr><td><strong>Presentation</strong></td><td>View</td></tr><tr><td></td><td>Scroll View</td></tr><tr><td></td><td>Grid View</td></tr><tr><td><strong>Selection &#x26; Input</strong></td><td>Text Field </td></tr><tr><td><strong>System</strong></td><td>Status Bar</td></tr></tbody></table>


# Custom Components

Create Custom Components and Craft Your Own Library

### What is a Custom Component?

When starting a new project, developers often create their own components. This approach simplifies maintenance and enhances the manageability of our codebase. For example, when a design change is needed for the buttons, it allows us to update a single component's style without having to adjust each button on every screen individually.

Creating custom components also makes the code more readable. Typically, incorporating all components on a screen results in lengthy and complex code. To improve readability, we segment the screen's code by creating new components.

That's why Monday Hero enables you to create custom components! You can select any part of the screen and simply click 'Create Custom Component' to begin. Monday Hero provides the freedom to create any component that’s needed.

In Monday Hero, custom components consist of system components. For instance, a custom component might be a section of the screen that includes buttons, texts, and text fields, making it more readable and reusable.

Monday Hero users generally create two types of components in their projects:

1. **Compact Custom Component**: This type of component is used to create a new style for a system component, such as a button. For example, you might want to create a 'Primary Button' to maintain design consistency across various screens. These components are standalone and do not contain other components within them, like a button that does not include a text field inside. Thus, they are termed compact components.&#x20;
   * In this example, the login and signup buttons are named `PrimaryButton`. The component code is created separately, allowing for reuse. This component code is also referenced in the page code. Below is the autogenerated code for it:

![Reusable Components](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-Mc42JKFwPyG7-HkChGD%2F-Mc47NcAPnKmkWW_dOSd%2FGroup%20454.png?alt=media\&token=a3074665-d83e-4fe6-b791-900fc2f93131)

{% tabs %}
{% tab title="PrimaryButton.Swift" %}

```swift
//PrimaryButton.swift
import UIKit

class PrimaryButton: UIButton {

	// MARK: - Initializers
	override init(frame: CGRect) {
		super.init(frame: frame)
		initialize()
	}

	required init?(coder aDecoder: NSCoder) {
		super.init(coder: aDecoder)
		initialize()
	}

	func initialize() {
		applyDefaultStyle()
	}

	// MARK: - Styling
	func applyDefaultStyle() {
		self.layer.cornerRadius = 10
		self.layer.masksToBounds =  true
		self.backgroundColor = UIColor.cerulean_64
		self.setTitleColor(UIColor.daisy, for: .normal)
		self.titleLabel?.font = UIFont.textStyle2
		self.contentHorizontalAlignment = .leading 
		self.contentEdgeInsets = UIEdgeInsets(top: 12, left: 138 , bottom: 12, right: 138)

	}

	func set(title: String){
		self.setTitle(title, for: .normal)
	}
```

{% endtab %}

{% tab title="SignupPage.Swift" %}

```swift
import UIKit

class SignupPage: UIViewController {

	@IBOutlet private weak var signupButton: PrimaryButton!

	override func viewDidLoad() {
		super.viewDidLoad()
		setupViews()
		setupLayout()
	}

}

extension SignUpViewController {
	private func setupViews() {

		signupButton.set(title: NSLocalizedString("signup", comment: ""))

	}

	private func setupLayout() {
		//Constraints are defined in Storyboard file.
	}

}

```

{% endtab %}
{% endtabs %}

2. **Custom Component Group**: This type of component is a part of any screen and is designed to make the code shorter so it's more readable. It may include compact custom components or any other type of component within it.

<figure><img src="https://479678609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEfkN8oSQyQ4BaBzwxH-4037006485%2Fuploads%2FIDp2YgVO33AKO0nfSRym%2FScreenshot%202024-04-30%20at%2016.23.23.png?alt=media&amp;token=375a6b75-384f-41f7-a8bc-a7bf5f9eaec5" alt=""><figcaption><p>Custom Component Code of a Screen</p></figcaption></figure>

### How to Create a Custom Component

1. **Navigate to the Screen:** Go to the screen from which you want to create a component.
2. **Highlight Layers:** Highlight the layers on the screen that you wish to convert into a component.
3. **Select the Component Type:** You can select the component type in three different ways:

Use the smart suggestions provided for component types. If the suggestions do not meet your needs, click 'More' to view the complete list of available components.

<figure><img src="https://479678609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEfkN8oSQyQ4BaBzwxH-4037006485%2Fuploads%2F65NeqOtJKkQdIIydyWjl%2FScreenshot%202024-04-30%20at%2016.32.37.png?alt=media&amp;token=11606ae2-6988-4810-bd04-842516b79e22" alt=""><figcaption></figcaption></figure>

**Right-click and select the component type from the menu.**

<figure><img src="https://479678609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEfkN8oSQyQ4BaBzwxH-4037006485%2Fuploads%2FVZeoJF3k5D4i8mhov0n1%2FScreenshot%202024-04-30%20at%2016.27.17.png?alt=media&amp;token=543c5777-6d8f-4db7-9172-541637eb2f4c" alt=""><figcaption><p>Right-click and Select The Component Type</p></figcaption></figure>

**Alternatively, click the components icon and select 'Create New Component'. Then, choose the component type from the list.**

<figure><img src="https://479678609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEfkN8oSQyQ4BaBzwxH-4037006485%2Fuploads%2FhfmXucl8hezmL35MJ1vz%2FScreenshot%202024-04-30%20at%2016.30.09.png?alt=media&amp;token=4673539e-62ce-4aba-aa32-a22103f46c99" alt=""><figcaption><p>Components Icon</p></figcaption></figure>

<figure><img src="https://479678609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEfkN8oSQyQ4BaBzwxH-4037006485%2Fuploads%2Fc24Fay5ZJaefba7IyzwX%2FScreenshot%202024-04-30%20at%2016.30.16.png?alt=media&amp;token=35a06acd-e325-41ad-acfd-8fbdbeb2c7dc" alt=""><figcaption><p>Component List</p></figcaption></figure>

3. **Set properties:** Once you select the component type, a new screen will appear on the left.

   * For each layer, select the necessary properties such as title, image, or background image. These options will appear in a list.
   * Properties will be automatically guessed by Monday Hero, but remember to adjust them if they don’t match the correct properties.

   Note: Some components do not have any properties. Here is a widget that does not have property selection:

<figure><img src="https://479678609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEfkN8oSQyQ4BaBzwxH-4037006485%2Fuploads%2FoeSFXMgY54fi4d9gMGYn%2FScreenshot%202024-04-30%20at%2016.23.06.png?alt=media&amp;token=405d878c-2906-4bd4-aa3b-b50c8f907163" alt=""><figcaption><p>Widget</p></figcaption></figure>

4. **Name Your Component:**  You will name your component during this step. This name is used to reference your component in your code, making it important to choose a name that you prefer.
5. **Finish:** Click 'Finish' to complete the creation process. Once finished, you will see a confirmation message indicating that the component was created successfully.

<figure><img src="https://479678609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEfkN8oSQyQ4BaBzwxH-4037006485%2Fuploads%2FfBe1F1kQAnKKINLffV3Z%2FScreenshot%202024-04-30%20at%2016.23.15.png?alt=media&amp;token=64ff67d7-683a-461f-840b-58441352c06c" alt=""><figcaption><p>Component Created Successfully</p></figcaption></figure>

Once the component is created successfully, you'll be able to see its code, and it will be ready for reuse.

<figure><img src="https://479678609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEfkN8oSQyQ4BaBzwxH-4037006485%2Fuploads%2FYVpf8LFpJmYvzsvOIjNL%2FScreenshot%202024-04-30%20at%2016.23.23.png?alt=media&amp;token=e2c8d0a3-d462-4b3c-98e0-26804c38bab9" alt=""><figcaption><p>Component Screen</p></figcaption></figure>

All the custom components that you have created in your project will be visible in your custom component library.

<figure><img src="https://479678609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEfkN8oSQyQ4BaBzwxH-4037006485%2Fuploads%2FBgHxCXr24wvr9gtT9Yv1%2FScreenshot%202024-04-30%20at%2016.43.28.png?alt=media&amp;token=50271092-7c81-4a5a-a2bb-dab5cd146d5b" alt=""><figcaption><p>Custom Component Library</p></figcaption></figure>

Congrats! It's done.&#x20;

In Swift, you can easily reuse custom components created in Monday Hero. Proceed to the next page to learn how to utilize these custom components on new pages on Monday Hero.


# Video Player Code Component

Add Video Player to iOS Code

If you want to play video in your app, you can use Monday Hero Video Player component.&#x20;

Here is how you can do it:

1. Right-click and select 'Create New Instance of / System / Monday Hero Video Player'

![Select Monday Hero Video Player Component](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEfkN8oSQyQ4BaBzwxH-4037006485%2Fuploads%2FJw5Y1f8lkgkSPIoTaEAo%2FScreen%20Shot%202022-02-11%20at%2017.22.11.png?alt=media\&token=22e01800-a564-4eec-b97f-0fe626987d25)

2\. Select the frame you want to embed the video player component, name the component and  enter **a video URL\*.**

![Enter Required Fields](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEfkN8oSQyQ4BaBzwxH-4037006485%2Fuploads%2F5GyX6jFkbVhKRDt7Ldoa%2FScreen%20Shot%202022-02-11%20at%2017.23.29.png?alt=media\&token=0a1024ee-f2e1-4f5e-952b-d81cc2f90469)

3\. Now you can download and play the video in your app.&#x20;

#### \*Video URL

In order for the video player component to work, you can add any video that streams. Here are some tools that you can use:

1. [Firebase](https://firebase.google.com/) ( Here is [how to add videos to Firebase](broken://pages/gOq7C1WBGgLEz67ZgaNM))
2. [Vimeo](https://vimeo.com) (Here is a how to add [direct links to video files](https://vimeo.zendesk.com/hc/en-us/articles/224823567-Direct-links-to-video-files))

Or any other tool that streams the video.

{% hint style="info" %}
Please note that the url should be secure, so the link should start with **https** not http.
{% endhint %}

#### Video Player on the Simulator

The video player will be embedded to the frame you select and it will work like the example below.

{% embed url="<https://drive.google.com/file/d/128to-i0-tBaYnJLgSpA7WTsDIqw83j4f/view?usp=sharing>" %}
Video Player Component
{% endembed %}


# Colors

When you import a design into Monday Hero, it identifies all the colors used in the design and saves them in HEX and RGB formats, along with their opacity values. It also removes duplicates to ensure your app has no redundant colors.

Navigate to the 'Theme/Colors' tab to review and rename the colors in your project. Please note that all colors are automatically downloaded when you sync the code with your project.

<figure><img src="https://479678609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEfkN8oSQyQ4BaBzwxH-4037006485%2Fuploads%2FnPgDmnsEnJnrMwlcCvxE%2FScreenshot%202024-04-29%20at%2019.58.01.png?alt=media&amp;token=192a965d-78e7-4e0f-b164-fe7f0d407c99" alt=""><figcaption><p>Monday Hero Color Screen</p></figcaption></figure>

#### Generated Code Example:

{% tabs %}
{% tab title="iOS" %}

```swift
import UIKit

extension UIColor {
	@nonobjc class var anchor: UIColor {
		return UIColor(red: 58.0 / 255.0, green: 67.0 / 255.0, blue: 79.0 / 255.0, alpha: 1.0)
	}

	@nonobjc class var cloud: UIColor {
		return UIColor(red: 179.0 / 255.0, green: 191.0 / 255.0, blue: 208.0 / 255.0, alpha: 1.0)
	}

	@nonobjc class var daisy: UIColor {
		return UIColor(red: 255.0 / 255.0, green: 255.0 / 255.0, blue: 255.0 / 255.0, alpha: 1.0)
	}

	@nonobjc class var pewter: UIColor {
		return UIColor(red: 92.0 / 255.0, green: 105.0 / 255.0, blue: 121.0 / 255.0, alpha: 1.0)
	}

	@nonobjc class var salt: UIColor {
		return UIColor(red: 230.0 / 255.0, green: 230.0 / 255.0, blue: 230.0 / 255.0, alpha: 1.0)
	}

	@nonobjc class var silver: UIColor {
		return UIColor(red: 168.0 / 255.0, green: 182.0 / 255.0, blue: 200.0 / 255.0, alpha: 1.0)
	}

	@nonobjc class var spruce: UIColor {
		return UIColor(red: 50.0 / 255.0, green: 59.0 / 255.0, blue: 69.0 / 255.0, alpha: 1.0)
	}

}
```

Check out the following directory to access the colors file generated by Monday Hero:

```
/ProjectName/Styles/Colors.swift
```

{% endtab %}
{% endtabs %}


# Text Styles

When you import a design into Monday Hero, it identifies all the text fonts used in the design and records the font family, size, and weight for each text element. Monday Hero then creates a list of text styles for you, removing any duplicates to ensure your app has a streamlined set of text styles.

Navigate to the 'Theme/Text Styles' tab to review and rename the text styles in your project. Please note that all text styles are automatically downloaded when you sync the code with your project.

{% hint style="info" %}
Monday Hero supports various font weights, including normal, bold, and italic. However, underlined and strikethrough text, as well as the addition of hyperlinks, are not supported in Monday Hero.
{% endhint %}

<figure><img src="https://479678609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEfkN8oSQyQ4BaBzwxH-4037006485%2Fuploads%2FyCJ3aW9USYdgSl4ZZ8S1%2FScreenshot%202024-04-29%20at%2020.05.39.png?alt=media&amp;token=69839c89-088d-4dfb-b0a8-072ac3471364" alt=""><figcaption><p>Monday Hero Theme / Text Styles</p></figcaption></figure>

**Importing Missing Font Files**

If your design utilizes custom fonts that aren't included in the system by default, you need to upload these missing fonts in .ttf or .otf format to Monday Hero. The platform processes the uploaded font files to ensure optimal results. Once uploaded, they will automatically sync with your project file in Monday Hero.

<figure><img src="https://479678609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEfkN8oSQyQ4BaBzwxH-4037006485%2Fuploads%2FCUdzaanGddGnZLOjrGfd%2FGroup%20501.png?alt=media&amp;token=670edf6b-0f9a-4fb4-a107-b99fe206550e" alt=""><figcaption><p>Uploading custom fonts to Monday Hero</p></figcaption></figure>

Generated code example:

{% tabs %}
{% tab title="iOS" %}
{% code overflow="wrap" %}

```swift
import UIKit

extension UIFont {
	class var textStyle: UIFont {
		return UIFont(name: "HelveticaNeue", size: 12.0) ?? UIFont.systemFont(ofSize: 12.0)
	}

	class var textStyle2: UIFont {
		return UIFont(name: "HelveticaNeue-Bold", size: 14.0) ?? UIFont.systemFont(ofSize: 14.0)
	}

	class var textStyle3: UIFont {
		return UIFont(name: "HelveticaNeue", size: 14.0) ?? UIFont.systemFont(ofSize: 14.0)
	}

	class var textStyle4: UIFont {
		return UIFont(name: "HelveticaNeue-Bold", size: 16.0) ?? UIFont.systemFont(ofSize: 16.0)
	}

}
```

{% endcode %}

Check out the following directory to access the fonts file generated by Monday Hero:

```
/ProjectName/Styles/Fonts.swift
```

{% endtab %}
{% endtabs %}


# Assets

All images are automatically sliced and uploaded to Monday Hero during the design file import process. To ensure they are cut correctly, verify that the images are grouped appropriately and set as exportable, as explained [here](/getting-started/design-handoff-to-ios-android-developer).

Navigate to the 'Theme/assets' tab to check the assets in your project, rename and download assets. You have the option to download assets individually or in bulk. Please note that all assets are automatically downloaded when you [download your project.](/design-to-swift/export-design-to-swift-android-code-monday-hero)

<figure><img src="https://479678609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEfkN8oSQyQ4BaBzwxH-4037006485%2Fuploads%2FTW6b4RVpzcRh6yGAvfQ0%2FScreenshot%202024-04-29%20at%2019.45.56.png?alt=media&amp;token=2f9e9af9-3855-4607-adde-1d612006ec8c" alt=""><figcaption><p>Monday Hero Theme / Assets Screen</p></figcaption></figure>

You can export assets to your Monday Hero project as PNG (1x, 2x, 3x) and/or PDF, depending on your needs. To change the asset format in your project, go to the Settings Screen.

<figure><img src="https://479678609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEfkN8oSQyQ4BaBzwxH-4037006485%2Fuploads%2F1tT72orlMevUbfDTnqXy%2FScreenshot%202024-04-29%20at%2022.31.11.png?alt=media&amp;token=b3fcecca-288e-4e82-89af-526cc1374a64" alt=""><figcaption><p>Settings Screen</p></figcaption></figure>


# Shadows, Gradients, and Other Design Elements

In this section, we'll explore how Monday Hero works with the Figma plug-in.

Here's a list of the information that Monday Hero can process effectively to give you the best results.&#x20;

### Shadow and Blur Effects

You can add blur and shadow effects on Figma to add aesthetics and functionality to your designs. Figma allows you to add drop shadow, inner shadow, layer blur, and background blur effects. You can choose your desired effect with targeted properties and Monday Hero can generate the relevant code for all of them.

<figure><img src="https://479678609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEfkN8oSQyQ4BaBzwxH-4037006485%2Fuploads%2FL0sU7fdMKcer9KY3Y03B%2FGroup%20504.png?alt=media&amp;token=a0add835-bce8-47db-a257-f68177cc441a" alt=""><figcaption><p>Adding the drop shadow effect</p></figcaption></figure>

### Gradients

Figma has different fill options like linear, radial, angular, and diamond to create the gradient effect. Unfortunately, Monday Hero doesn't support these gradient features. That's why, when you're uploading a design to Monday Hero, please be sure that you only use the '**solid fill**' option.

<figure><img src="https://479678609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEfkN8oSQyQ4BaBzwxH-4037006485%2Fuploads%2Fe0XzwLBZHnZ6d0WudVx6%2FGroup%20505.png?alt=media&amp;token=4ae9e45d-67f6-4011-a9f8-02aa39399172" alt=""><figcaption><p>Only solid fill option is supported in Monday Hero.</p></figcaption></figure>

### Borders

When you apply borders to an image, you can change its color, weight, distribution, side, and endpoint properties from Figma. With Monday Hero, you can get the relevant code of these properties.

<figure><img src="https://479678609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEfkN8oSQyQ4BaBzwxH-4037006485%2Fuploads%2FQnRTUA1YAaTz6Xgl4nij%2Fimage.png?alt=media&amp;token=eea66c3e-1d03-43b8-a6fd-6e311b6b12d7" alt=""><figcaption><p>Monday Hero generates the code according to border properties at Figma.</p></figcaption></figure>

### Animations

Animations in Figma are not a supported feature in Monday Hero. That's why, please only upload designs with no animation.


# Firebase

Here you can find how to use Firebase with features of Monday Hero

On Monday Hero, you can add Video Player component to your app with the Firebase URL. More features will come soon!


# How to get Video URL from Firebase

Use Firebase to add your Videos and use them in your app with Monday Hero

1. Go to [Firebase Console](https://console.firebase.google.com/) and login.

**Create New or Use an Existing Project**

Create a new project or use existing one depending on your choice, If you have no project, please create a new one by following 3 steps below.

![Create a new project](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEfkN8oSQyQ4BaBzwxH-4037006485%2Fuploads%2FdJvTKSmMLFSTG4AjugQB%2FCreate-Project-1.png?alt=media\&token=53143b8c-168f-4512-9363-4352ff16488f)

1. Name your project:                                                 &#x20;

![](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEfkN8oSQyQ4BaBzwxH-4037006485%2Fuploads%2Fh0rAutyaqSTmnawwSQAa%2FCreate-Project-2.png?alt=media\&token=acac98b9-f0b7-457c-955d-28fab2c17632)

2\. Enable or Disable Analytics(depending on your choice) and press continue:

![](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEfkN8oSQyQ4BaBzwxH-4037006485%2Fuploads%2Fck5Ml3oljwhjuVZm7KJk%2FCreate-Project-3.png?alt=media\&token=037d5adb-2838-4992-8ff1-c10afd30ef82)

3\. Select your zone and press the create project button.

![Finish Creating Project](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEfkN8oSQyQ4BaBzwxH-4037006485%2Fuploads%2FELk00cwVSiYJPgsQN16V%2FCreate-Project-4.png?alt=media\&token=fed68afa-63e7-4b80-b196-0131902d7ce0)

Congrats! You're ready to upload your files to Firebase.

**Upload Video to Storage**&#x20;

Select the project you want to add your video into and **Go to Build/Storage** tab on the left menu:

![](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEfkN8oSQyQ4BaBzwxH-4037006485%2Fuploads%2FksBAtWrkWkwkVttmwgQq%2FStorage-1.png?alt=media\&token=a2a6b014-7061-4a09-892f-5d96d07055ca)

If you haven't setup the storage before, setup the storage following the steps below.

1. Select rules for product/test mode and click next: &#x20;

![](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEfkN8oSQyQ4BaBzwxH-4037006485%2Fuploads%2FBs0mXsY4X1JYlODXAE5I%2FStorage-2.png?alt=media\&token=f72c27f8-af9f-4c74-928b-37bdb038a25a)

2\. Select the location and complete setup:&#x20;

![](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEfkN8oSQyQ4BaBzwxH-4037006485%2Fuploads%2FvSIOCvIfqJCNRa7Cftsr%2FStorage-3.png?alt=media\&token=2d54a803-04db-4fdb-9085-162e7aed717f)

When the storage setup is completed:

1. &#x20;Upload the video using the upload file button:          &#x20;

![Upload File](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEfkN8oSQyQ4BaBzwxH-4037006485%2Fuploads%2FkVuA6XY4Pl13qEL8o5GM%2FStorage-4.png?alt=media\&token=f7b08d59-7821-44db-8d4e-a9d892e2e71c)

2\. Click on the file to copy the url. Right-click and copy the url address.                                     &#x20;

![Copy the URL](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEfkN8oSQyQ4BaBzwxH-4037006485%2Fuploads%2FY50PZv6jFa5yQSHA0GNN%2FStorage-5.png?alt=media\&token=da8524fa-7fb1-44f5-8bfb-a4cc82504659)

Now, you're ready to go! Use it with on [Monday Hero Video Player Component](broken://pages/vH9AoK12PcpECjtjTak4) to get the code of your custom video player code automatically.


# Export Code

Export the generated UI code as iOS/Android code and run in Xcode.

### Download Code & Assets

Once you've created all your components, edited assets, and are satisfied with the previewed code, it's time to export the code and begin working with it. Follow the steps below to download the code.&#x20;

To export the code, follow these steps:

1. Navigate to the screen you want to export the code for.
2. Review the code on the right side of the screen. If you cannot see any code, ensure you have created your components and clicked '**Mark as Complete**'. Only completed screens are downloaded in Xcode, ensuring you won't have any extra code. If you can't see your code, the screen will look like this:

<figure><img src="https://479678609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEfkN8oSQyQ4BaBzwxH-4037006485%2Fuploads%2FHZzUIAloMvlQC62skuMC%2FScreenshot%202024-04-30%20at%2018.51.18.png?alt=media&amp;token=f4783caf-ab4d-4570-9596-83bcb2aad312" alt=""><figcaption><p>Monday Hero Screen Page</p></figcaption></figure>

3. Click the 'Download Code' button at the bottom of the code.

<figure><img src="https://479678609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEfkN8oSQyQ4BaBzwxH-4037006485%2Fuploads%2F3aP8c9upqvoGmreEEUQk%2FScreenshot%202024-04-30%20at%2018.50.12.png?alt=media&amp;token=095ae5a0-394c-486f-98d3-5c675f71e958" alt=""><figcaption><p>Download Code</p></figcaption></figure>

4. After clicking the 'Download Code' button, you'll be prompted to edit the path, or you can choose to export it to the default path provided. If you're on the web, it will automatically download without prompting. The download will start automatically in a few seconds.

<figure><img src="https://479678609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEfkN8oSQyQ4BaBzwxH-4037006485%2Fuploads%2FeJeQPJcbBnB9aXrbd2qX%2FScreenshot%202024-04-30%20at%2018.54.27.png?alt=media&amp;token=e7a64cef-66e5-442d-b0e2-ab16ab9052af" alt=""><figcaption><p>Download Path Selection</p></figcaption></figure>

![.zip file will be downloaded instantly. ](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MSE9ek5CGSNnly4yLaD%2F-MSECKsjfagjdyCTxNtQ%2FGroup%2010.png?alt=media\&token=662b3d06-e836-425d-8766-9348d0aad467)

Once the project has been exported, you'll find the colors, fonts, assets, and UI layout code in the project files.

### Overview of the Exported iOS Project

Monday Hero exports an Xcode with **colors**, **fonts**, **assets**, **string**, and **layout** files. Please note that there are no duplicate values in colors, fonts, and string files.

Here's an overview of the exported project structure:

{% tabs %}
{% tab title="iOS" %}

#### Project Structure

Upon unzipping the PROJECTNAME.zip file, you'll find the iOS-Example folder containing: Assets.xcassets, Components, Extensions, Localizable.strings, Main.storyboard, Styles, ViewControllers.

![](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MSE9ek5CGSNnly4yLaD%2F-MSEDPWQ9cAytkv-DnrP%2FScreen%20Shot%202021-01-29%20at%2020.37.57.png?alt=media\&token=61ac20c3-e95d-4e38-8145-c065a5656bc1)

**Storyboard File**\
\
Screens are exported as a Main.storyboard file. Alternatively, you can export only the code without the storyboard by managing in the project settings.

![Downloaded Storyboard file for entire project.](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MI-NbWu56TTM6ugd9x6%2F-MI2wc_eosFNV5_U8FB3%2FScreen%20Shot%202020-09-25%20at%2009.27.45.png?alt=media\&token=484a106d-66c2-4402-9b03-887b8ae1480d)

**Colors**\
Colors are consolidated into a Colors.swift file, automatically named by Monday Hero. Duplicate values are eliminated for efficiency.

![Colors.swift file.](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MI-NbWu56TTM6ugd9x6%2F-MI2x-w9xBmUsL2UAFz2%2Fcolors.png?alt=media\&token=40ed2eb4-1219-44f6-a724-9d00f008cd27)

**Fonts**\
Fonts and their sizes are bundled into one file, accessible as text styles in the Fonts.swift file.

![Fonts.swift file.](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MIxiseiC4-6m86I0qv0%2F-MIxqXSzKICvkMIdn_OG%2Fimage.png?alt=media\&token=baf552c3-40fc-4ffc-9cfe-cdbb9e6f0da1)

**Strings**\
Strings are exported in a single file for the entire project, housed in the Localizable.strings file.

![Localizable.strings file.](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MI-NbWu56TTM6ugd9x6%2F-MI2xLyoznt-WQzwaatC%2Fstrings.png?alt=media\&token=16bdcccd-481a-4737-abc1-7cfabcb02007)

**Assets**\
All assets are downloaded in 1x, 2x, and 3x densities, ready for immediate use. They're conveniently organized within the Assets.xcassets folder.

![Asset folder and files in an exported project.](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MSE9ek5CGSNnly4yLaD%2F-MSEEGkgrqt44uB7d8Ds%2FScreen%20Shot%202021-01-29%20at%2020.42.16.png?alt=media\&token=1e66d8df-c75f-4b20-8780-5028af50b176)
{% endtab %}
{% endtabs %}

The project structure provided above ensures seamless integration with Xcode. With the UI already exported, you can focus on backend services and configurations. Happy coding!


# Integrating Exported Files into an Existing Xcode Project

Integrating Exported Files into an Existing Xcode Project

### Add Project Files into another Xcode project

After exporting code from Monday Hero, you may need to integrate the files into your Xcode project. Here's a step-by-step guide:

1. Navigate to your Xcode project, right-click on the project folder, and select 'Add Files To \[nameOfTheProject]'.

![](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MI2yiPVcm5vDocDrXhg%2F-MI2zbM9SUlyMu34LHk0%2F02.png?alt=media\&token=83b4e909-d29e-4c3e-b46c-73a0760299d2)

2. Select the newly exported files located in the main folder. Click 'Add' to proceed.

![](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MI2yiPVcm5vDocDrXhg%2F-MI2zpezsJSCTvzVjZiy%2F03.png?alt=media\&token=10bb5405-918b-459a-9e21-21beaef3db51)

That's it! The selected files are now added to your Xcode project.

![](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MI2yiPVcm5vDocDrXhg%2F-MI3--75XwyG9BQ2ZtGo%2F04.png?alt=media\&token=435e98be-f380-41e1-8b07-a6ee68078b15)

You can refer to the example above for a visual demonstration of the working project setup. Once integrated, your project is ready for development outside of Monday Hero. Happy coding!


# Hero AI Assistant

Use Hero AI Assistant to convert to another development language, fix bugs, add validations, include translations, and more.

Once you finish creating your component or screen, now it's time to add more on top of it using Hero AI Assistant.&#x20;

You can use Hero AI Assistant to add any code to the code that you created with Monday Hero. You can fix bugs, convert it to another development language that's not in Monday Hero yet, add a validation to the existing code, and much more.&#x20;

Here is an example of how Hero AI Assistant works:

1. Click on your project and navigate to the Hero Assistant button.

<figure><img src="https://479678609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEfkN8oSQyQ4BaBzwxH-4037006485%2Fuploads%2FnluwNEDkiewWnBEaVxWD%2FScreenshot%202024-05-08%20at%2013.27.49.png?alt=media&amp;token=b5abb722-9d36-4294-a7e5-d83985551e87" alt=""><figcaption><p>Hero Assistant</p></figcaption></figure>

2. Click 'Create Conversation' at the top right. Upon clicking, you will see the screen below. Select a screen or component code.

<figure><img src="https://479678609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEfkN8oSQyQ4BaBzwxH-4037006485%2Fuploads%2FPGHDgNHwDiRJMKd1MGYJ%2FScreenshot%202024-05-08%20at%2013.27.35.png?alt=media&amp;token=eb698ccb-bd85-4fb0-874e-30fa51a3f981" alt=""><figcaption><p>Select a screen or a component or theme file</p></figcaption></figure>

3. Choose a pre-prepared prompt or write your own, then click 'Submit'. For this example, 'Convert to React' is selected.

<figure><img src="https://479678609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEfkN8oSQyQ4BaBzwxH-4037006485%2Fuploads%2FpB2AGTjLxs1Ni3RftN1v%2FScreenshot%202024-05-08%20at%2013.27.58.png?alt=media&amp;token=b64981ac-8da3-40f8-ae4d-48c92cf5c543" alt=""><figcaption><p>Select prompt and click submit</p></figcaption></figure>

4. Once you click 'Submit', you will receive the updated code!&#x20;

<figure><img src="https://479678609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEfkN8oSQyQ4BaBzwxH-4037006485%2Fuploads%2F07mUNRh5kxW6FM5GZNzF%2FScreenshot%202024-05-08%20at%2013.24.02.png?alt=media&amp;token=a6224cc9-f96a-4f5d-bbb3-be4925ab5d8c" alt=""><figcaption><p>React Code Example</p></figcaption></figure>

<figure><img src="https://479678609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEfkN8oSQyQ4BaBzwxH-4037006485%2Fuploads%2FDnxqLrhHMTEURbWRyNbi%2FScreenshot%202024-05-08%20at%2013.20.07.png?alt=media&amp;token=64e9c178-7c9a-476b-a74d-80cb4bcc824f" alt=""><figcaption><p>React Code Example Continued</p></figcaption></figure>

That's all. Continue chatting with Hero AI Assistant for all the changes you need in your code, such as adding validations, fixing bugs, and more.

Here are the pre-prepared prompts and additional functionalities you can explore with Hero AI Assistant:

**Validation:**

* URL Format Validation
* Alphabetic Only Validation
* Numeric Only Validation
* Password Strength Validation
* Pattern Matching (Regex) Validation
* Email Format Validation
* Alphanumeric Validation
* Minimum Length Validation
* Maximum Length Validation
* Required Field Validation
* Custom Validation

**Bug Fixes:**

* Custom Bug Fix
* Layout Overflow Bug Fix

**Code Conversion:**

* Convert to a Specified Dev-Lang
* Convert to SwiftUI
* Convert to Kotlin
* Convert to React
* Convert to React Native

**UI Manipulation:**

* Make An Element Parametric for Dynamic Content
* Make All Elements Parametric for Dynamic Content
* Center the Title in a Button
* Rename a UI Element
* Remove All Suffixes
* Remove a Suffix

**Other Features:**

* Explain Code
* Translate to Another Language
* Improve JSON Key Readability
* Get the Full Code

You can use Hero AI Assistant with tokens. Please find detailed information about the tokens here:

{% content-ref url="/pages/AZKhPAuQIVRoqjHMJiXi" %}
[Frequently Asked Questions](/reachus/frequently-asked-questions)
{% endcontent-ref %}

If you have new prompt requests or any questions, please contact us at <team@mondayhero.io> or visit [https://mondayhero.io](https://mondayhero.io/) and start a chat from the bottom right of the page.


# Convert Design to React

Use Hero AI Assistant to convert the design to React.

The Monday Hero Team is working hard to enable you to create the React projects. However, without this support, you can still get React code from Monday Hero using the steps below:

### How to Get React Code:

1. [Log in](/getting-started/login-create-project-in-monday-hero) to your Monday Hero account.
2. [Create a Flutter project](/getting-started/login-create-project-in-monday-hero).&#x20;
3. [Upload](/getting-started/import-design-files-into-monday-hero) designs to your project. Please make sure the designs are revised to[ get the best code results](/getting-started/design-handoff-to-ios-android-developer) on Monday Hero.
4. Create[ custom Flutter components](/design-to-flutter/creating-components/custom-components) like Custom Widgets, Buttons, Lists, and more. Preview the code on Monday Hero if you like.&#x20;
5. Once the component code is ready, click 'AI Assistant' to start.

   <figure><img src="https://479678609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEfkN8oSQyQ4BaBzwxH-4037006485%2Fuploads%2FCI1IXkkswFHoyGxTb7rt%2FScreenshot%202024-07-08%20at%2022.35.46.png?alt=media&amp;token=2a542a71-82c3-4c6a-903c-f7cf4542396d" alt=""><figcaption><p>Hero AI Assistant</p></figcaption></figure>

Once you start the Assistant, it will automatically generate the Flutter code.

<figure><img src="https://479678609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEfkN8oSQyQ4BaBzwxH-4037006485%2Fuploads%2FwzJZCJBpZ7yPC7h7YeH3%2FScreenshot%202024-07-08%20at%2022.37.30.png?alt=media&amp;token=4b33fe0f-3dcb-450a-92e1-8b421b725e16" alt=""><figcaption></figcaption></figure>

6. Select '**Convert to React**' on the prompts and then click '**Submit**'.&#x20;

<figure><img src="https://479678609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEfkN8oSQyQ4BaBzwxH-4037006485%2Fuploads%2FHLRhRKuHdo88UPoEScJ0%2FScreenshot%202024-07-08%20at%2022.38.43.png?alt=media&amp;token=e897d434-4649-454f-9bac-e49c4d73d285" alt=""><figcaption><p>Prompts Screen</p></figcaption></figure>

Now you have the React code created for you!

<figure><img src="https://479678609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEfkN8oSQyQ4BaBzwxH-4037006485%2Fuploads%2FGTL7okDFdkxF4EJGhfpf%2FScreenshot%202024-07-08%20at%2022.40.10.png?alt=media&amp;token=25b9501b-55c7-4163-8f5b-f60f6104b422" alt=""><figcaption><p>React Code</p></figcaption></figure>

7. Once you have the React code, you can either use it in the way that's provided or write your own prompt. For example you can type: '**Create Styled Components**' in order to get the styles separately(like the example below). It's done!

Here is another React code example:

<figure><img src="https://479678609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEfkN8oSQyQ4BaBzwxH-4037006485%2Fuploads%2F07mUNRh5kxW6FM5GZNzF%2FScreenshot%202024-05-08%20at%2013.24.02.png?alt=media&amp;token=a6224cc9-f96a-4f5d-bbb3-be4925ab5d8c" alt=""><figcaption><p>React Code Example</p></figcaption></figure>

<figure><img src="https://479678609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEfkN8oSQyQ4BaBzwxH-4037006485%2Fuploads%2FDnxqLrhHMTEURbWRyNbi%2FScreenshot%202024-05-08%20at%2013.20.07.png?alt=media&amp;token=64e9c178-7c9a-476b-a74d-80cb4bcc824f" alt=""><figcaption><p>React Code Example Continued</p></figcaption></figure>

{% hint style="info" %}
Please remember to add the Colors Code to the AI Assistant prompt to ensure the correct colors in the generated React code.
{% endhint %}

<figure><img src="https://479678609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEfkN8oSQyQ4BaBzwxH-4037006485%2Fuploads%2Fb3eAL4iyaXuIsS48y1sh%2FScreenshot%202024-07-08%20at%2022.56.20.png?alt=media&amp;token=03b53fa0-b024-4b15-9572-74f69daab77f" alt=""><figcaption><p>Color Code</p></figcaption></figure>

If you have new prompt requests or any questions, please contact us at <team@mondayhero.io> or visit [https://mondayhero.io](https://mondayhero.io/) and start a chat from the bottom right of the page.


# Travel App

Build and run the Travel App in both iOS & Android. The source code and designs are available in Sketch and Adobe XD, also free to use.

## Travel App Tutorial iOS code and Sketch/Adobe XD design included.

In this tutorial, a travel app that's shown below will be created with Monday Hero App.

![Travel app pages, supported for both iOS and Android.](https://479678609-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEfkN8oSQyQ4BaBzwxH%2F-MIT8ZubYubvi04MoG9K%2F-MITAxeqrjtnqYX6d2sM%2Fpreview.png?alt=media\&token=4dbd5158-43f7-4707-bd91-65e981eb3328)

In this app, users can share the pictures that they take, have a timeline and profile page like Instagram. Depending on your experience and the drafts that you have, building an app UI like this one, **takes hours to days**. We will build this app from scratch, with no codebase. With this tutorial, you can do it **less than half an hour**. This tutorial is published on Monday Hero blog, you can reach the link below.&#x20;

{% embed url="<https://mondayhero.io/blog/post/showcase-1-building-an-instagram-like-travel-app-ios-tutorial>" %}
Code Travel App with Swift&#x20;
{% endembed %}

If you are a new user of Monday Hero, [click here for getting started with the installation.](/getting-started/install-app-and-plugin) You can read information from the sign up to create the first project.&#x20;


# Frequently Asked Questions

**What is Monday Hero?**

Monday Hero is a platform that translates your designs into reusable Swift and Dart code. It helps to accelerate development, ensure consistency, and promote efficient teamwork.

***

**Which design platforms does Monday Hero support?**

Monday Hero supports Figma, Adobe XD, and Sketch. You can find information about uploading files in the documentation.

***

**How much time can Monday Hero save me?**

While it varies based on the project and individual work pace, Monday Hero users often report a time saving of up to 60% on the design-to-code process by reducing the need to code design details manually.

***

**What programming languages does Monday Hero generate code for?**

Currently, Monday Hero provides code generation for Swift (iOS) and Dart (Flutter). React will be supported for the web and it's on the roadmap. You can use Hero AI Assistant to convert the generated code for Swift or Flutter to React or any other development language.

***

**What is the ETA for React project support?**

React project support is on our [roadmap](https://mondayhero.frill.co/roadmap). Currently, the team is working on the React support. We're in the internal test phases. Users will be able to start React projects by Q3-2024 (probably in Sept), at which point we will begin collecting feedback. We aim to complete reviews in Beta and resolve any bugs by Q4, moving the React support to a stable release.&#x20;

You can currently use '**Convert to React**' prompts with the **Hero AI Assistant** on Swift or Flutter projects to get **React** code for your components.

***

**What is Hero AI Assistant?**

Hero AI Assistant is an AI tool designed to enhance and expand upon your coding projects on Monday Hero. After creating a component or screen, you can use Hero AI Assistant to add functionalities, fix bugs, convert code into different programming languages, and apply a wide range of validations. It offers a variety of pre-ready prompts such as bug fixes, code conversion, UI manipulation, and validation rules to streamline development and ensure code quality.

***

**What is AI Token?**

Tokens are like pieces of words. The Hero AI Assistant uses different AI models, each with unique capabilities and costs, to help with conversations. Each model uses a varying number of Hero AI tokens. For example, 1000 AI Hero Tokens are equivalent to 10,000 tokens when using the GPT 3.5 model.

***

**How are AI Hero Tokens consumed? Does generating code for 1 screen consume 1 AI token?**

AI Hero Tokens are not consumed, when you are generating code within the Monday Hero project.

Tokens begin to be consumed only while you are interacting with the AI Assistant. In the Hero AI Assistant, there are ready-made prompts available for use with AI Hero Tokens, or you can create your own prompts and integrate additional code into your Monday Hero projects. You’re able to see this on the Hero AI Assistant screen.

Within the Hero AI Assistant, you have the ability to convert your code into another development language, such as **React**, **Kotlin**, **SwiftUI**, and **others**. You can also **fix bugs**, **add validations**, or even **translate** your app's **text into different languages**.

You can find more information about the Hero AI Assistant [here](/hero-ai-assistant/hero-ai-assistant).

***

**What does 'Project' refer to? How do project limitations work?**

MondayHero enables you to create and manage multiple projects at the same time. Here, a "Project" typically refers to an application (it could be an iOS app, Flutter app, etc.) for which you can import screen designs.&#x20;

**Project limitation** refers to the maximum number of active projects you can have simultaneously. For example, with Starter plan, if you have already created one project but wish to start another, you can simply delete the existing project and replace it with the new one. Additionally, you have the option to export the code of your projects if needed before deleting them.

Each project has a limit of 100 screens. If you reach this limit, you can either remove unnecessary screens or create a new project to continue adding screens.

***

**Does Monday Hero support custom components?**

Yes, with Monday Hero, you can create a library of custom, reusable components from any part of your design, enhancing your productivity.

***

**How can I get started with Monday Hero?**

To start with Monday Hero, simply sign up for a free trial on our website and upload your design. If you want to see how it works before starting, we offer a demo as well.

\ <br>


