TextOptions. You can set the semantic style preset (which resolves to theme CSS variables at render time), override individual properties like fontSize, color, and fontFamily, and control paragraph spacing and alignment. Builder functions validate all options through Zod at call time, so you’ll get a clear runtime error before anything is sent to the API.
Text
Atext layer renders one or more lines of styled prose. Pass a single string for a one-liner, or an array of strings to stack multiple paragraphs with consistent styling.
Inline syntax
Builder function syntax
Multi-line text
Pass an array of strings to render multiple paragraphs — each string becomes its own line, all sharing the same style options.TextStyle presets
Thestyle option maps to one of eight theme-aware presets. Render-time CSS variables resolve these to the appropriate font size, weight, and line-height for the active deck theme — so your text automatically matches the presentation’s visual language.
title
Largest display text — slide titles, hero headers
h1
Primary section heading
h2
Secondary heading or subtitle
h3
Tertiary heading, callout labels
body1
Standard body copy
body2
Smaller body text, secondary prose
note
Footnotes, caveats, source lines
caption
Image captions, chart sub-labels
TextOptions reference
Theme text style preset. Resolves to CSS variable-backed typography at render time. Override individual fields (
fontSize, fontWeight, etc.) to customize beyond the preset.Font size as a CSS string, e.g.
'24px' or '1.5rem'. Overrides the style preset’s default size.Text color as a CSS color string, e.g.
'#1a1a2e', 'rgba(0,0,0,0.8)', or 'var(--slide-brand)'.Font family — must be one of the families available in the deck theme (
fontFamilySchema).Font weight on the 100–900 axis, e.g.
400, 600, or 'bold'.Line height multiplier or absolute value, e.g.
'1.5' or '28px'.Letter spacing (tracking), e.g.
'0.02em' or '1px'.Inline text highlight color — paints a background behind the text itself (not the layer box).
Paragraph spacing above, e.g.
'12px'.Paragraph spacing below, e.g.
'8px'.Shorthand for
fontWeight: 700. If fontWeight is also set, fontWeight wins.Render text in italic style.
Horizontal text alignment within the layer box.
Full example
Bullets
Abullets layer renders an unordered list. Pass an array of strings — each string becomes one bullet item. Bullet options extend all of TextOptions, so you can style both the marker and the item text in one call.
Inline syntax
Builder function syntax
Bullet-specific options
These options are available in addition to allTextOptions fields.
Standard CSS bullet marker shape. Use
bulletStyle for custom icon keys.Custom bullet icon key, e.g.
'circle-filled', 'arrow-right', 'check'. Overrides listStyleType when set.Color applied to the bullet marker only — independent of the item text color.
Bullet marker size in pixels.
Stroke width for outlined bullet markers.
Vertical spacing in pixels between list items.
Horizontal gap in pixels between the bullet marker and the item text.
Vertical alignment of the bullet marker relative to the first line of item text.
Example with custom markers
Numbered
Anumbered layer renders an ordered list. Like bullets, pass an array of strings and style both the number marker and the text. The listStyle option controls the numbering scheme — decimal, alphabetic, or Roman numerals.
Inline syntax
Builder function syntax
Numbered-specific options
Numbering scheme for the markers. Defaults to
'decimal' (1, 2, 3…).Color applied to the number marker only.
Font size for the number marker in pixels.
Font family for the number marker — lets you use a display font for numbers while keeping body text in the theme font.
Font weight for the number marker.
Vertical spacing in pixels between list items.
Horizontal gap in pixels between the number marker and the item text.
Vertical alignment of the number marker relative to the first line of item text.
Example with Roman numerals
The
listStyle option mirrors the CSS list-style-type property vocabulary. Use 'lower-alpha' for (a, b, c…), 'upper-alpha' for (A, B, C…), 'lower-roman' for (i, ii, iii…), and 'upper-roman' for (I, II, III…).Choosing between inline and builder syntax
- Use inline syntax when…
- Use builder functions when…
You are composing a layer array for a slide definition and want all layer data in one place. The inline object is just a plain TypeScript object literal — no imports beyond
Decks itself.