fills field accepts an array of Fill objects rendered bottom-to-top as CSS background layers — the same stacking model as Figma. Each builder function produces one valid Fill. Import the builders you need directly from @abloatai/decks.
Fill builders
solidFill(color, opacity?)
A flat solid color fill.
string
required
Any CSS color value: hex (
'#3B82F6'), rgb(), hsl(), a named color, or a theme CSS variable ('var(--slide-brand)').number
default:"1"
Fill opacity from
0 (fully transparent) to 1 (fully opaque).linearGradient(stops, opts?)
A linear gradient compiled to a linear-gradient() CSS string.
GradientStop[]
required
Color stops along the gradient axis. Each stop has a
color and an optional at position (0–1, where 0 = 0% and 1 = 100%). Stops without at are distributed automatically by CSS.number
default:"180"
Gradient direction in degrees.
0 = bottom to top, 90 = left to right, 180 (default) = top to bottom, 135 = diagonal top-left to bottom-right.number
default:"1"
Overall fill opacity.
radialGradient(stops, opts?)
A radial gradient compiled to a radial-gradient() CSS string.
GradientStop[]
required
Color stops — same shape as
linearGradient stops.[number, number]
Center of the radial gradient as
[x, y] in 0–1 coordinates relative to the box. Default is the box center ([0.5, 0.5]).number
default:"1"
Overall fill opacity.
meshGradient(points, opts?)
A mesh gradient — multiple stacked radial blobs that blend together into a soft, organic gradient. Each point is a colored glow positioned on the box in 0–1 coordinates.
MeshPoint[]
required
The gradient blobs. Each point has a color, a 2D position, and an optional radius.
string
A base color or gradient string rendered behind all the blobs. If omitted, the mesh is transparent where no blobs overlap.
number
default:"1"
Overall fill opacity.
imageFill(url, opts?)
An image fill applied to a shape box. Use ablo.images.upload() to get a CDN URL for local files.
string
required
A hosted image URL. External URLs are rehosted to the Ablo CDN at commit time. Use
ablo.images.upload() for local files.'cover' | 'contain' | 'fill'
default:"'cover'"
How the image fills the shape box.
'cover' crops to fill; 'contain' letterboxes; 'fill' stretches.number
default:"1"
Overall fill opacity. Combine with a
solidFill tint above it in the stack for a color wash effect.shaderFill(input, opacity?)
An animated WebGL shader gradient. Runs in the browser via @shadergradient — renders as a static snapshot in exported images.
ShaderPreset
required
The shader algorithm preset. See ShaderPreset values below.
{ color1, color2, color3 }
required
The three colors the shader mixes. All three are required. Accepts any CSS color value.
number
default:"0.2"
Animation speed multiplier.
0 = frozen, 1 = fast.number
default:"1.3"
Wave / noise density. Higher values produce finer detail.
boolean
default:"true"
When
false, the shader renders as a static frame — useful for exported images.number
default:"1"
Overall fill opacity.
Types
Fill
The output of every builder function — one entry in a layer’s fills stack.
FillType
Fill kind:
'solid' | 'gradient' | 'image' | 'shader'.boolean
Whether this fill layer renders. Always
true from builders; toggle it to temporarily hide a fill.number
Fill opacity from
0 to 1.string
Present on
solid fills.string
Present on
gradient fills — the compiled CSS linear-gradient() or radial-gradient() string.object
Present on
image fills — { url, objectFit?, width?, height? }.object
Present on
shader fills — { version, preset, colors, uSpeed, uDensity, animate }.