layoutId, which is a property of the deck). When you mark a layout as a master, every other layout in the same container inherits its layers automatically, giving you a global chrome layer (logo, page number, background) that propagates across all slides.
ablo.layouts.create(params, options?) → LayoutResource
Creates a new layout template, minting ids for each layer and returning the full placeholder map so you can immediately pass the result to createSlide.
string
required
The id of the layout container — the
layoutId field returned on a DeckResource. Every slide layout belongs to a container, and a deck references one container.string
required
Human-readable name shown in the editor’s template picker.
SlideBackgroundInput
Background applied to every slide that uses this layout. Accepts the same value as a slide’s own
background field — a color string, a background builder result (solidBackground, gradientBackground), or a raw CSS string. Slide-level backgrounds override this.boolean
When
true, this layout becomes the master of its container. Its layers are inherited by every other layout in the same container. Use the master for global chrome (logo, footer bar, slide number) that should appear on every slide.LayoutLayerInput[]
The template’s layers. Each entry is a standard
LayerInput (see LayerInput reference) extended with an optional placeholder field.RequestOptions
Per-call commit controls. See RequestOptions.
LayoutResource
string
The layout’s id.
string
The name you provided.
string
The container this layout belongs to.
{ id: string; type: string }[]
The ids and types of the created layers, in input order.
Record<string, LayoutPlaceholder>
A map from placeholder name to slot metadata. Pass this directly to
createSlide.ablo.layouts.createSlide(layout, params, options?) → SlideResource
Creates a slide on a layout and fills its placeholder slots by name, all in one atomic commit. The layout argument is the LayoutResource returned by layouts.create — it carries the placeholder map the method needs to resolve slot names to layer ids.
LayoutResource
required
The
LayoutResource returned by layouts.create. The method reads layout.placeholders to resolve each fill key to the correct layout layer.string
required
The deck this slide belongs to.
number
required
Zero-based position of the slide in the deck.
string
Slide title (shown in the editor’s slide list).
Record<string, LayerContent>
A map from placeholder name to content. Keys must match placeholder names on
layout.placeholders. Values are LayerContent objects — the return value of any content builder: text(), bullets(), barChart(), table(), image(), and so on. Unmentioned placeholders remain empty.RequestOptions
Per-call commit controls.
SlideResource — { id, deckId, title, order }.
ablo.layouts.addLayer(slideLayoutId, layer, options?) → { id, type }
Adds a single layer to an existing layout. Use this to evolve a template without recreating it. The layer argument accepts the same LayoutLayerInput shape as layouts.create, so you can add a placeholder layer after the fact.
string
required
The id of the layout to add the layer to.
LayoutLayerInput
required
The layer to add. Any valid
LayerInput extended with an optional placeholder spec.RequestOptions
Per-call commit controls.
{ id: string; type: string } — the minted layer id and its type.
ablo.layouts.deleteLayer(id, options?) → CommitReceipt
Removes a layer from a layout by the layer’s id. Slides that inherited the layer will no longer render it.
string
required
The layout layer id to delete.
RequestOptions
Per-call commit controls.
ablo.layouts.retrieve(id) → LayoutRecord
Fetches the stored LayoutRecord for the given layout id. Requires a readable client.
string
required
The layout id to retrieve.
LayoutRecord — { id, name, layoutId, settings }. See LayoutRecord.
ablo.layouts.update(params, options?) → CommitReceipt
Renames a layout or changes its background.
string
required
The layout to update.
string
New name for the layout.
SlideBackgroundInput
New background — same type as the
create background field.RequestOptions
Per-call commit controls.
ablo.layouts.delete(id, options?) → CommitReceipt
Deletes a layout. Slides that reference this layout as their template will lose the layout chrome.
string
required
The layout id to delete.
RequestOptions
Per-call commit controls.