---
title: "One Template, Every Format: Auto Layout for Multi-Format Design"
description: "Auto layout in CE.SDK v1.87 lets one design become a post, a story and a banner, in the web editor and through the API, without a separate layout per format."
url: "https://img.ly/blog/auto-layout-one-template-every-format/"
type: "blog"
date: "2026-12-01"
author: "Jan"
tags: ["CE.SDK","Creative Automation","Product Update"]
---

> This is the markdown version of [One Template, Every Format: Auto Layout for Multi-Format Design](https://img.ly/blog/auto-layout-one-template-every-format/). For all pages in one file, see [llms-full.txt](https://img.ly/llms-full.txt). For an index of all available pages, see [llms.txt](https://img.ly/llms.txt).

---

## The Job: One Design, Five Formats, No Rebuild

Product teams at ad tech and marketing platforms describe the same chore in almost the same words: for every format of every campaign, someone has to build the layout again, and it takes a long time. A user designs a square post they like, and then the platform asks them, or its own template team, to make the story, the banner and the wide version from scratch.

Your users want to finish a design once and get every format they publish, with the headline still readable and the logo still where the brand guide puts it. A resize button that squeezes everything into a box does not do that, because a good design is rarely a grid of equal rectangles.

CE.SDK v1.87 adds auto layout to the engine and to the web editor, so that job becomes a property of the template instead of code your team writes.

<video src="https://img.ly/static/auto-layout-ce-sdk-imgly.mp4" controls autoplay muted loop playsinline aria-label="Animated: one NORRVIK design reflows from square to story to banner, splits into the three formats side by side, and stacks back into the square"></video>

## Who Has This Job

We see it most often in these app types, where users publish the same message in more than one size.

### Ad Tech and Dynamic Creative Platforms

A campaign manager uploads one creative and expects it to fill every placement the media plan lists, from a medium rectangle to a full-screen interstitial.

### Social Schedulers and Creator Tools

A creator designs a feed post and wants the story and the reel cover from the same file, scheduled together, without opening three canvases.

### Marketing Platforms With Brand Portals

A franchisee or a dealer localizes a national ad with their address and offer, then needs it as a poster for the shop window and as a social ad for the same week.

### Retail Media and E-Commerce

A merchandiser drops one product shot, a name and a price into a tile that has to work in a square grid slot, a tall sidebar slot and a wide homepage banner on the same [e-commerce](https://img.ly/industries/e-commerce.md) storefront.

### AI Ad Generators

An agent produces a design the user approves, and the other formats adapt from that approved design instead of being generated again, which keeps the output consistent and avoids paying for a second round of generation.

### Real-Estate Listing Marketing

An agent publishes a new listing and needs the same photo, price and contact block as a portrait flyer, a square social post and a wide email header, all from the one template their [real-estate platform](https://img.ly/industries/real-estate.md) provides.

### Print and Digital Campaign Kits

A marketing team approves an A5 flyer and wants the matching web banner and social graphic to come out of the same layout rather than a second design brief.

## What Teams Did Before

Most platforms we talk to solved this in one of two ways, and both got more expensive every year.

The first was one layout per format, where a template team built the square, the story and the banner as separate templates and kept them in sync by hand. Every brand change, legal line or new placement size multiplied the work by the number of formats, and users who edited one version saw that their edits did not carry over to the others.

The second was code that moved elements, where engineers wrote rules that read the page size and repositioned or rescaled each block, such as moving the logo when the page is tall and shrinking the headline when it is wide. Those rules worked for the templates they were written for and broke on the next template a designer shipped. Resizing became a source of support tickets that read "can you fix this format?"

Teams that tried strict ratio-locked templates ran into a different problem. Designers told us that locking every design to fixed boxes limits them to a few boxy layouts.

## How Auto Layout Works in v1.87

Auto layout gives a page, or any part of a page, a layout of its own. The children of that container then position and size themselves, and the design resizes without manual fixes. Containers without a layout keep working exactly as before, so a design can mix free placement and flowing content.

### Rows, Columns and Grids, With Wrap

A container can arrange its children in a row, in a column or in a grid, and a row or column can let its elements wrap to the next line when they run out of space. The order of the children is the flow order, and gap and padding values set the spacing. A grid has column and row tracks that accept fixed lengths, shares such as `1fr`, percentages and content-based sizes, and an element can span several tracks.

### Hug, Fill and Fixed Sizing

Each element decides how it sizes itself on each axis: Fixed keeps its size, Hug follows its content, and Fill takes the free space that is left. A text block set to Fill wraps at the width it receives, so a headline grows into a wide banner and breaks onto more lines in a narrow story.

![One row layout at 1500 and 960 pixels wide: the photo is Fixed and keeps its width, the text is Fill and its headline wraps in the narrow row, and the Shop mugs button is Hug](https://img.ly/_astro/hug-fill-fixed.9R96Ubve.webp)

### Frames

A frame is a page inside a page that groups content, with its own fill, stroke and effects, and clips its children by default, so anything that sticks out is cut off at its edge. Its opacity, blend mode and masks apply to everything inside it, which makes a frame the natural unit for a card, a price badge or a photo with a caption.

### Scale With Page

One setting on a page makes its content scale with the page's shorter side. Font sizes, spacing, corner radii, strokes and fixed sizes all follow, while the layout rearranges the content for the new aspect ratio. The scale changes no property of the content itself, so the stored design stays the one your user made. If the content still does not fit after that, the page scales it down until it fits.

![The same template on a 1080 by 1080 post and a 1080 by 1920 story at scale 1, and on a 1920 by 1920 post at scale 1.78, with Scale with page turned on](https://img.ly/_astro/scale-with-page.Dos1ddZ_.webp)

### Show What Fits, in Priority Order

Some elements belong only in some formats, so a block can be shown only for a range of page aspect ratios or parent sizes, and a long subtitle can appear in the square and the story and stay out of the banner. When a layout runs out of room, elements with a hide order step aside one at a time, lowest order first, and they come back when the page changes size and they fit again.

![One template as a 9:16 story and a 2:1 banner. The subtitle has hide order 1: it shows in the story and is hidden in the banner, while the price badge ignores the layout](https://img.ly/_astro/show-what-fits.BrlUHm4H.webp)

Elements that should stay out of the flow, such as a corner badge, can ignore the layout and follow a resize constraint instead: pinned to the start, end or center, stretched, or scaled with their parent.

### In the Web Editor: Shift+A and the Frame Inspector

Your users do not need to know most of these terms, because in the web editor they press Shift+A, drag elements into frames and grids, and set the direction, gap, padding and alignment in the Frame inspector. Scale with page, visibility ranges and hide orders are set in code or in the template. The engine features above are available in code on web, iOS, Android, macOS and server.

### Existing Designs Stay Unchanged

Upgrading to v1.87 does not move a single element in templates you already ship. Auto layout applies only where someone gives a container a layout, so you can adopt it template by template.

## Components: Edit a Brand Element Once

The same release adds components, documented on the same page as auto layout, and they are available in code on web, iOS, Android, macOS and server, with no editor UI yet.

You convert a frame into a main component and create instances of it. Each instance follows every property of the main component that it does not override, and an override on one instance does not break its link to the main. You can combine components as variants, name the variant values, and switch an instance from one variant to another. Component properties expose chosen fields, such as a title text, so each instance can set its own value. If an instance drifts too far, you can reset its overrides, or detach it to turn it into plain blocks.

For a platform, this changes two everyday objects. A brand lock-up, the logo with its tagline and clear space, becomes one main component, and every post, story and banner holds an instance, so a new logo is one change instead of one per template. A price tag becomes a component with a price property and variants such as regular and sale, so each product tile sets its own price while the typography and badge shape stay identical everywhere. A component can be a frame, so it can carry its own layout and adapt to each format along with the rest of the design.

Instances protect the structure on purpose, since their children cannot be added, reordered or destroyed, only hidden. That suits a lock-up your brand team owns, and it is the wrong tool for content your users are meant to rearrange.

## What It Looks Like in Your Product

In the web editor you embed, auto layout shows up as part of the normal editing flow. Users build or adjust a design, change the page size, and watch the content reflow, with the Frame inspector there when they want to adjust a gap, the padding or the alignment. Template creators on your side set the layouts, sizing and hide orders once, and everyone who adopts the template gets formats that hold together.

Through the API, the same properties drive [creative automation](https://img.ly/use-cases/creative-automation.md) jobs: generate a design from data, then set new page dimensions for each placement and export. The example below follows the [auto layout documentation](https://img.ly/docs/cesdk/js/create-composition/auto-layout-c7e41a.md) and assumes that `page` is a page in the scene, and `headline` and `subtitle` are existing text blocks.

```javascript
// A column inside the page, with spacing and padding
const card = engine.block.create('page');
engine.block.appendChild(page, card);
engine.block.setEnum(card, 'layout/mode', 'Vertical');
engine.block.setFloat(card, 'layout/gap', 16);
engine.block.setFloat(card, 'layout/padding/left', 24);

// The headline takes the free width and wraps inside it
engine.block.appendChild(card, headline);
engine.block.setEnum(headline, 'layoutChild/widthSizing', 'Fill');
engine.block.setHeightMode(headline, 'Auto');

// The subtitle is the first element to step aside when space runs out
engine.block.appendChild(card, subtitle);
engine.block.setInt(subtitle, 'layoutChild/visibility/hideOrder', 1);

// Content scales with the page, then the square becomes a story
engine.block.setEnum(page, 'layout/scaleContent', 'ShorterSide');
engine.block.setWidth(page, 1080);
engine.block.setHeight(page, 1920);
```

The components API reads the same way, with calls such as `convertToComponent`, `createInstance` and `setComponentProperty`, and the [components section of the docs](https://img.ly/docs/cesdk/js/create-composition/auto-layout-c7e41a.md#components) covers variants, resets and detaching. For the editor your users would work in, see [CE.SDK](https://img.ly/products/creative-sdk.md), and for platforms whose users post to several networks, see [social media](https://img.ly/industries/social-media.md).

![A main logo component, centered, linked by dashed lines to three instances in a post, a story and a banner](https://img.ly/_astro/cesdk-187-components.2q5eEyJr.jpg)

## Limits, and When Not to Use It

Auto layout adapts a template to each format, and the composition stays the one the designer built. If your brand team wants a different composition for the banner than for the story, with another crop and another message, build those as separate pages and use auto layout inside each one.

Scale with page has no floor: when content still does not fit, the page scales it down until it does, so a long headline in a very wide, very short banner can end up smaller than your brand guide allows. Set hide orders and visibility ranges for the elements that matter less, and check the extreme formats before a template goes live.

There are a few engineering details to plan for, starting with positions: a child in a flow has no position of its own, so setting its x or y position returns an error. Code that placed blocks by coordinates needs to move them out of the flow or into a container without a layout. Frames are pages, so a lookup by page type returns frames too, and code that counts pages should use the scene's page list instead. A page's parent is now the scene, and saved scenes load without their stack block, so check any code that walks from a page to its stack.

Components have no editor UI in v1.87, so for now your engineers and your template pipeline are the ones who use them. If a design is used in a single format and never resized, a layout only adds setup work.

## FAQ: Auto Layout and Components in CE.SDK

### Will upgrading to v1.87 change our existing templates?

No, no element moves in the designs you already have. Auto layout only applies to containers that someone gives a layout, so you can add it to one template at a time and leave the rest untouched.

### Does auto layout force designs into a grid of boxes?

No, because layout is set per container, and a container without a layout keeps free placement. Elements can also stay out of a flow and follow a resize constraint instead, so designers keep overlapping and free-form compositions while the parts that should flow adapt to each format.

### Can our end users use auto layout without writing code?

Yes, in the web editor, where users press Shift+A, drag elements into frames and grids, and adjust the gap, padding and alignment in the Frame inspector. Components are different: in v1.87 they are available in code only.

### What happens when content does not fit a new format?

Elements with a hide order step aside one by one, lowest order first, and return when the page changes size and they fit. If the content still does not fit, a page with scale with page turned on scales the content down until it fits.

### Which platforms support auto layout and components?

The auto layout engine features run on web, iOS, Android, macOS and server, so the same templates can resize in an editor or in a headless batch job. The hands-on editing UI is in the web editor, and components are available in code on the same platforms.

### Can one instance of a component differ from the others?

Yes, an instance can override properties, set its own component property values and switch between variants without losing its link to the main component. Reset the instance to drop its overrides, or detach it to turn it into plain blocks.

## Next Steps

Start with the [auto layout and components documentation](https://img.ly/docs/cesdk/js/create-composition/auto-layout-c7e41a.md), which covers the properties in the code sample. The [CE.SDK v1.87 release notes](https://img.ly/blog/creative-editor-sdk-v-1-87-0-release-notes.md) list the other changes in the release, including the breaking changes to check before you upgrade.

If you run templates through a pipeline, read how CE.SDK handles [creative automation](https://img.ly/use-cases/creative-automation.md). If your users are marketers or creators, see how it fits [marketing technology platforms](https://img.ly/industries/marketing-tech.md) and [social media products](https://img.ly/industries/social-media.md), or start from the [CE.SDK product page](https://img.ly/products/creative-sdk.md) to see what your users would get in the editor.

---

## More Resources

- **[IMG.LY Website](https://img.ly/index.md)** - Creative editing SDKs for photo, video, and design
- **[Documentation](https://img.ly/docs/cesdk/)** - CE.SDK developer documentation
- **[Build with a coding agent](https://img.ly/SKILL.md)** - A skill that adds a CE.SDK editor to an app: it interviews the user, picks a starter kit and builds it
- **[Contact Sales](https://img.ly/forms/contact-sales.md)** - Get a custom quote. A public JSON API accepts the request directly, no account or key needed. Ask your user for consent and their details first.
