> For the complete documentation index, see [llms.txt](https://docs.scaleflex.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.scaleflex.com/studio/template-builder/creating-a-template.md).

# Creating a template

A new template starts with its first layout: the canvas you will design on. The editor opens with the **Add first layout** window over it, where you give the layout a name and a size.

### Where to start

| Starting point                         | What to do                                                                  |
| -------------------------------------- | --------------------------------------------------------------------------- |
| The templates list in Template Builder | Click **Create template**                                                   |
| An existing template in the DAM        | Open the asset and click **Edit template**, or use the library context menu |

### Creating a template from scratch

1. Open the templates list and click **Create template**. The editor opens with the **Add first layout** window over it.
2. In **Name**, name the layout you are about to create, for example `Website banner`. Use 3 to 32 characters.
3. Pick a **Canvas size**, either one of the presets below or **Custom**.
4. Adjust **Width** and **Height** if you need to. Use the lock between them to keep the proportions while you resize.
5. Choose a **Color** for the canvas background. The first swatch is transparent.
6. Click **Add**.

The name also gives the layout its slug, which is how a render request asks for this layout. It is the name in lowercase, with anything that is not a letter or a digit turned into an underscore, so `Website banner` becomes `website_banner`. The slug is fixed once the layout exists, so settle on the name before you click **Add**.

<div align="left"><figure><img src="https://2536208400-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fqsq2dR7Fjagf5eTifWZx%2Fuploads%2FcZ1f82O1dj5ju73JFrxg%2F03-create-dialog-canvas-sizes.png?alt=media&amp;token=3328fbb9-56e4-4a48-a424-f8ba8866553a" alt="" width="375"><figcaption></figcaption></figure></div>

#### Canvas size presets

| Group        | Preset           | Size        |
| ------------ | ---------------- | ----------- |
| Banners      | Landscape banner | 800 x 400   |
| Banners      | Portrait banner  | 200 x 800   |
| Social media | Facebook cover   | 820 x 312   |
| Social media | Facebook post    | 1200 x 630  |
| Social media | Facebook story   | 1080 x 1920 |
| Social media | Instagram post   | 1080 x 1080 |
| Social media | Instagram story  | 1080 x 1920 |
| Social media | LinkedIn cover   | 1584 x 396  |
| Social media | LinkedIn post    | 1200 x 627  |
| Social media | X header         | 1500 x 500  |
| Social media | X post           | 1200 x 675  |

Choosing **Custom** lets you set any size from 10 px to 5000 px per side. Changing the width or height by hand switches the preset to **Custom**.

#### Naming rules

| Field    | Rule                                                                                |
| -------- | ----------------------------------------------------------------------------------- |
| **Name** | 3 to 32 characters                                                                  |
| **Slug** | Not typed in: made from the name when the layout is created, and fixed from then on |

#### If you close the window

Closing **Add first layout** without clicking **Add** keeps you in the editor, on an empty canvas that reads *No layouts yet*. Click **Add layout** there to open the window again.

The same window opens whenever you open a template that has no layouts yet.

### What happens next

The window closes on your new canvas, with no layers on it. Add content with [Layers](/studio/template-builder/building-a-template/layers.md), then save.

{% hint style="info" %}
The name you typed belongs to the *layout*, not to the template. Your template becomes a file in your DAM library the first time you save it. See [Preview and save](/studio/template-builder/building-a-template/preview-and-save.md).
{% endhint %}

<figure><img src="https://2536208400-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fqsq2dR7Fjagf5eTifWZx%2Fuploads%2F4FWQuqXboQsSrDC9xf1d%2F04-editor-after-creation.png?alt=media&amp;token=610129b6-35aa-4804-afe6-5e6a4689b119" alt=""><figcaption></figcaption></figure>

### Where to go next

* [Layouts](/studio/template-builder/building-a-template/layouts.md) to add more output sizes.
* [Layers](/studio/template-builder/building-a-template/layers.md) to put content on the canvas.
* [Preview and save](/studio/template-builder/building-a-template/preview-and-save.md) to store the template in your library.
