> For the complete documentation index, see [llms.txt](https://sketch2react.gitbook.io/marcode/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sketch2react.gitbook.io/marcode/learn/exporting-to-code.md).

# Exporting to Code 🚚

## Export to Ionic Capacitor (iOS, Android)

![Marcode has many code export options](/files/EYNoZ19ozBOrSsdYHiVB)

You can export directly to iOS & Android project via something awesome called Ionic [Capacitor.js](https://capacitorjs.com)

1. Make sure you have visited each artboard in Marcode’s Explorer once
2. Open up the Export view **⌘E** and choose **Ionic Capacitor**
3. Select a directory for your exported **project folder**
4. Hit the Export button and you’re ready for the next step ✅

### Install Xcode Command Line Tools & CocoaPods first

This is **crucial** to do before you go to the next step of installing either the iOS or Android platforms.

* Download and install the **Xcode Command Line tools**. You can do this directly from [within Xcode](https://capacitorjs.com/docs/v3/getting-started/environment-setup) or you can just fire up the mighty Terminal app and add this installation snippet:

```
xcode-select —install
```

* Download and install [CocoaPods](https://cocoapods.org/), easiest is just by adding this snippet directly in the Terminal:

```
sudo gem install cocoapods
```

### Choose between iOS or Android

Now comes the part where you choose which platform to install for use with Capacitor. You can choose between iOS or Android, we have added both to the config.json file.&#x20;

#### **For iOS**

Just follow [these instructions](https://capacitorjs.com/docs/v3/ios#adding-the-ios-platform).

#### **For Android**

Just follow [these instructions](https://capacitorjs.com/docs/v3/android#adding-the-android-platform).

## 📚We have a great guide

{% embed url="<https://code.sketch2react.io/ios-and-android>" %}

## Export to HTML

1. Make sure you have visited each artboard in Marcode’s Explorer once
2. Open up the Export view **⌘E** and choose **HTML**
3. Select a directory for your exported **project folder**
4. Hit the Export button and you’re done ✅

## Export as CSS Styleguide

1. Make sure you have visited each artboard in Marcode’s Explorer once
2. Open up the Export view **⌘E** and choose **Styleguide**
3. Select a directory for your exported **project folder**
4. Hit the Export button and you’re done ✅


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://sketch2react.gitbook.io/marcode/learn/exporting-to-code.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
