Media & Video
Lumina supports video backgrounds on any slide, and video elements in Half and Flex layouts.
Video object (VideoProperties)
Use { type: "video", src, poster?, autoplay?, loop?, muted?, controls?, className? }. For backgrounds, wrap in background: { type: "video", src, ... } and optionally set opacity on the slide. For Half, use video: { type: "video", src, autoplay?, muted?, loop? } instead of image. For Flex, use an element { type: "video", src, controls?, size?, fill?, fit? }.
Video Backgrounds
Set background on any slide to a video object. Works on all layouts. You can add opacity for an overlay effect.
Video Elements
In Half and Flex layouts, you can use video instead of image (Half) or a type: "video" element (Flex).
In Half Layout
In Flex Layout
Introduction
Lumina is a high-performance, Universal Presentation Engine.
Unlike traditional tools that trap your content in proprietary file formats, Lumina defines presentations as pure JSON data. This approach enables programmatic generation, easy version control, and dynamic storytelling experiences.
Fast by default
Bundles Vue 3 and GSAP internally to ensure instant load times and buttery smooth 60fps animations.
Declarative JSON
Manage your content as code. Git-diff your presentations. Generate decks from APIs.
Installation
Lumina is available as a Universal NPM package. It works in any JavaScript environment
(Vanilla, React, Vue, Svelte, etc.). Vue and GSAP are bundled; Chart.js is an optional peer only if you use type: "chart" slides.
npm install lumina-slides
# Optional, only for chart slides: npm install chart.js
Requirements
- Node.js 18+ for development.
- Vue 3 and GSAP are bundled; no separate install.
- Chart.js ^4 (optional): install only if your deck uses
type: "chart".
Quick Start
Import the stylesheet and initialize the engine in your main entry file.
import { Lumina } from 'lumina-slides';
import 'lumina-slides/style.css';
// Initialize (theme, loop, navigation, touch, etc.)
const engine = new Lumina('#app', {
theme: 'ocean',
loop: true,
navigation: true,
touch: true
});
// Load your deck
engine.load(myDeckData);
Studio
Build and edit decks visually with the built-in Studio: inspector, toolbar, and one-click export.
Mount Lumina with studioEmbed: true on a DOM node and optionally pass an initialDeck. When the user saves in Studio, listen for the save event to get the full deck object.
import { Lumina } from 'lumina-slides';
import 'lumina-slides/style.css';
// Optional: deck to load when the app starts. Omit for an empty deck.
const initialDeck = {
meta: { title: 'My Presentation' },
slides: [
{ type: 'statement', title: 'Welcome', subtitle: 'Edit in Studio.' },
{
type: 'features',
title: 'Features',
features: [
{ title: 'One', description: 'First feature' },
{ title: 'Two', description: 'Second feature' }
]
}
]
};
const engine = new Lumina('#app', {
studioEmbed: true,
initialDeck
});
engine.on('save', (deck) => {
// Persist to your backend, download as JSON, or load elsewhere
console.log('Deck saved:', deck);
});
Options
| Option | Description |
|---|---|
| studioEmbed: true | Renders the Studio UI (inspector, toolbar) next to the deck. |
| initialDeck | Optional. Deck object { meta, slides } to load on init. Omit for an empty deck. |
When the user clicks Save in Studio, Lumina emits save with the full deck. Use it to persist, export, or feed into another Lumina instance.
Deck Structure
A deck is a JSON object with meta and slides. Both are required.
{
"meta": {
"title": "My Presentation",
"author": "Dev Team",
// Optional: theme preset or ThemeConfig
"theme": "ocean",
// Optional: start elements hidden (see Element Control)
"initialElementState": { "s0-tag": { "visible": false } },
"elementControl": { "defaultVisible": false },
// Optional: animation overrides (durationIn, revealDelayMs, etc.)
"effects": { "durationIn": 1 }
},
"slides": [
{ "type": "statement", "title": "Hello", "subtitle": "World" }
// Each slide: type, and props per layout (title, image, timeline, ...)
]
}
Common slide-level properties (SlideBase)
Every slide inherits these optional properties. Layout-specific props are in each layout reference.
| Property | Type | Description |
|---|---|---|
| sizing | "viewport" | "container" | Height behavior. Default: "viewport" (min 100vh). "container" = 100% of parent. |
| background | string | VideoProperties | Image URL or { type: "video", src, poster?, autoplay?, loop?, muted? }. |
| backgroundOpacity | number | 0–1. Default: 1 (or 0.2 for default overlay). |
| notes | string? | Speaker notes (basic markdown). For exportState and speaker window. |
| class | string? | Extra CSS class on the slide content container. |
| timelineTracks | Record<id, Keyframes> | Remotion-style: { [elementId]: { "0": { opacity, x, y, scale, rotate?, visible? }, "1": {...} } }. Use with engine.seekTo(progress). |
| reveal | RevealInSequenceOptions? | When set, engine runs revealInSequence on ready and slideChange. delayMs, staggerMode, preset, etc. |
| ids | Record<path, string>? | Override element ids: { "tag": "intro-tag", "features.0": "hero" }. For engine.element(id). |
| meta | object? | Slide-specific: orbColor, orbPos, backgroundSize, or custom. |
| id | string? | Unique slide ID. Used by exportState and navigation. |
| title | string? | Fallback for exportState/speaker notes when the layout has no required title. |
Slide Layouts
Lumina includes responsive layouts for common scenarios. Each layout has a reference section with a full property table.
Statement
High impact text for big ideas. Ideal for section headers or punchlines.
{
"type": "statement",
"tag": "Optional label",
"title": "Hello World",
"subtitle": "This is a statement slide."
}
Properties: title (required), tag, subtitle (optional).
Half / Split
Image or video on one side, content on the other. imageSide: left | right. Use image or video ({ type: "video", src, autoplay?, muted?, loop?, controls? }). Optional: tag, cta (button label).
{
"type": "half",
"imageSide": "right",
"image": "/assets/demo.jpg",
"tag": "Optional",
"title": "Split Layout",
"paragraphs": ["Content goes here."],
"cta": "Learn More"
}
Features
A responsive grid of feature cards. Each item: title, desc (or description), icon (e.g. fa-bolt, star, zap); optional class, id. Optional section description.
{
"type": "features",
"title": "Core Features",
"description": "Optional",
"features": [
{ "class": "", "title": "Fast", "desc": "60fps", "icon": "fa-bolt" }
]
}
Timeline
Chronological events in a vertical layout. Each item: date, title, description; optional icon, id.
{
"type": "timeline",
"title": "History",
"subtitle": "Optional",
"timeline": [
{ "date": "2024", "title": "Launch", "description": "V1 Released" }
]
}
Flex
Flow-based layout with size tokens (half, third, …). Elements: title, text, bullets, image, html, video, button, content (supports nesting), timeline, stepper, spacer. See Flex in Layouts.
{
"type": "flex",
"direction": "horizontal",
"elements": [
{ "type": "image", "src": "/img.jpg", "size": "half", "fill": true },
{ "type": "content", "size": "half", "elements": [
{ "type": "title", "text": "Hello" },
{ "type": "bullets", "items": ["A", "B"] }
]}
]
}
Also: Chart (bar, line, pie, doughnut), Custom HTML, Video (full-screen), Diagram (Vue Flow nodes/edges), Free (absolutely positioned text/image/box with timelineTracks). See the Layouts section for property tables.
Embedding & Sizing
By default, Lumina slides take up the full viewport height (100vh) to create an
immersive experience.
However, if you want to embed a slide inside a smaller container (e.g., a dashboard widget or a blog post card), you can change the sizing mode.
Container Mode
Set the sizing property to 'container' in your slide data. This
tells the engine to respect the parent container's height instead of forcing full screen.
{
"type": "timeline",
"sizing": "container", // Default is "viewport"
"title": "Project History",
"timeline": [...]
}
Pro Tip
When using 'container' mode, ensure the parent
element has a defined height (e.g., h-96 or fixed pixels), otherwise the
slide content might collapse or expand unexpectedly.
Configuration
Pass options to new Lumina(selector, options). All properties are optional.
Core
theme— Preset name (default,ocean,midnight,forest,cyber,latte,sunset,monochrome) or aThemeConfigobject.loop— Loop back to the first slide after the last. Default:false.selector— Override the mount selector (default from constructor).debug— Enable debug logs. Default:false.studio— Enable Studio (page builder) mode. Default:false.
Navigation
Control how users move between slides (buttons, keyboard, touch):
navigation— Master switch. Iffalse, prev/next arrow buttons are hidden and keyboard/touch do nothing. Default:true.keyboard— Enable keyboard shortcuts for next/prev. Only applies whennavigationis true. Default:true.touch— Enable touch/swipe for next/prev. Only applies whennavigationis true. Default:true.ui.showControls— Show or hide the prev/next (and speaker-notes) buttons in the footer. When hidden, keyboard and touch still work if enabled. Default:true.keys— Custom key bindings:keys: { next: ['ArrowRight',' ','Enter'], prev: ['ArrowLeft','Backspace'] }. UseKeyboardEvent.keyvalues. You can override only one side, e.g.keys: { prev: ['Backspace'] }keeps defaultnextand only changesprev.
elementControl
Elements are hidden by default and cascade-reveal on slide enter. Set elementControl: { defaultVisible: true } to show all (legacy). Override per id with meta.initialElementState. See Element Control.
animation
Override timings and eases. Same keys can be set in deck.meta.effects or slide.meta.effects; precedence: slide > meta > options > defaults.
enabled,type(fade|slide|zoom|cascade),durationIn,durationOut,stagger,ease,easeOut,entranceRevealrevealDelayMs,revealDuration,revealEase— forrevealInSequence;defaultCascadeDelayMs,defaultCascadeDuration— for implicit default cascadeelementDuration,elementEase— forelement(id).animate()
ui
ui: {
visible: true,
showProgressBar: true,
showSlideCount: true,
showControls: true // Next/Prev + speaker-notes; hide to rely only on keyboard/touch
}
Events & API
Subscribe with engine.on(event, handler); unsubscribe with engine.off(event, handler) using the same function reference.
ready
Fired when a deck is successfully loaded. Payload: the Deck object. Register ready (and slideChange) before engine.load(deck) when using element control or revealInSequence.
slideChange
Fired when the active slide changes. Payload: { index, previousIndex, slide }.
action
Fired on user interactions (e.g. button clicks). Payload: { type, label?, value?, origin? }. For buttons, type is often "button"; label and value (or action) come from the element. For slide-update (e.g. diagram): slideIndex, patch (e.g. { nodes, edges }).
error
Fired when an internal error occurs. Payload: Error. Use engine.emitError(err) to forward errors from your app.
Additional events
Lifecycle and features: patch ({ diff } when engine.patch()), destroy (on engine.destroy()), navigate ({ direction, fromIndex, toIndex } when next/prev/goTo change the slide), themeChange ({ theme }), speakerNotesOpen, speakerNotesClose, timelineSeek ({ progress, slideIndex }), timelineComplete ({ slideIndex }), revealStart ({ slideIndex, elementIds }), revealComplete ({ slideIndex }), revealElement ({ slideIndex, elementId, index }).
engine.on('ready', (deck) => { /* deck loaded */ });
engine.on('slideChange', ({ index, slide }) => {
console.log(`Slide ${index}: ${slide.type}`);
});
engine.on('action', (p) => {
if (p.type === 'button' && p.value) window.open(p.value, '_blank');
});
engine.on('error', (err) => console.error(err));
engine.on('patch', ({ diff }) => console.log('Patched', diff));
engine.on('navigate', ({ direction, toIndex }) => console.log(direction, toIndex));
Navigation & state
engine.next(), engine.prev(), engine.goTo(index), engine.currentSlideIndex, engine.exportState() (for LLM context: { status, currentSlide: { index, type, title }, narrative, engagementLevel, history }), engine.destroy().
Element Control (Reveal on Demand)
Start with elements hidden and reveal them in sequence: ideal for blank slides that
fill in as you speak, or for effects driven by engine.element(id).
How element ids are assigned
Each controllable element has a stable id used in engine.element(id), meta.initialElementState, and engine.getElementById(id). Layouts wrap content in LuminaElement with :id="resolveId(data, slideIndex, path)", which is written as data-lumina-id in the DOM.
Resolution order (in resolveId):
- Slide root (path
[]or['slide']):slide.idif present, otherwises{N}-slide. - Object with
id: if the value at that path is an object withid: string(e.g.features[0].id, a diagram node), thatidis used. slide.ids[key]: e.g.slide.ids["tag"],slide.ids["features.0"]. Overrides the fallback when the object has noid.- Fallback: if
slide.idis set →{slide.id}-{path}(e.g.intro-tag,intro-title); these IDs stay stable when you insert, remove or reorder slides. Otherwise →s{N}-{path}(e.g.s0-tag,s1-features-0).
Stable IDs with slide.id: set id: "intro" on a slide so the fallback becomes intro-tag, intro-title, etc. Recommended when using meta.initialElementState or reorderable decks.
Element IDs per layout
Each row is one controllable element. Path is used in engine.element(slideIndex, "tag") or engine.elementInCurrent("title"). Fallback ID when no slide.id, slide.ids or object.id; with slide.id: "x" it becomes x-tag, x-title, etc. When = always, or only when that field exists in the slide JSON.
| Layout | Path | Fallback ID | When |
|---|---|---|---|
| statement | tag | s{N}-tag | only when tag is set |
| statement | title | s{N}-title | always |
| statement | subtitle | s{N}-subtitle | only when subtitle is set |
| features | header | s{N}-header | always (wrapper for title + description) |
| features | title | s{N}-title | always |
| features | description | s{N}-description | only when description is set |
| features | features.0, features.1, … | s{N}-features-{i} or features[i].id | one per feature |
| half | media | s{N}-media | always |
| half | tag | s{N}-tag | only when tag is set |
| half | title | s{N}-title | always |
| half | paragraphs | s{N}-paragraphs | always |
| half | cta | s{N}-cta | only when cta is set |
| timeline | title | s{N}-title | always |
| timeline | subtitle | s{N}-subtitle | only when subtitle is set |
| timeline | timeline.0, timeline.1, … | s{N}-timeline-{i} or timeline[i].id | one per item |
| steps | header | s{N}-header | always (wrapper for title + subtitle) |
| steps | title | s{N}-title | always |
| steps | subtitle | s{N}-subtitle | only when subtitle is set |
| steps | steps.0, steps.1, … | s{N}-steps-{i} or steps[i].id | one per step |
| flex | elements.0, elements.1, … | s{N}-elements-{i} or elements[i].id | one per element |
| flex | elements.i.elements.j | s{N}-elements-{i}-elements-{j} | content children only |
| chart | title | s{N}-title | only when title is set |
| chart | subtitle | s{N}-subtitle | only when subtitle is set |
| chart | chart | s{N}-chart | always (may be absent in DOM if Chart.js fails) |
| video | video | s{N}-video | always |
| video | title | s{N}-title | only when title is set |
| diagram | nodes.0, nodes.1, … | nodes[i].id or s{N}-nodes-{i} | set nodes[i].id in JSON for control |
| diagram | edges.0, edges.1, … | edges[i].id or s{N}-edges-{i} | set edges[i].id in JSON for control |
| free | elements.0, elements.1, … | s{N}-elements-{i} | one per element |
Discover and target: engine.elements() or engine.elements(slideIndex) lists all ids for a slide (omit slideIndex for the current slide). engine.element(id), engine.element(slideIndex, "tag"), or engine.elementInCurrent("title") for the current slide by path. Override any path via slide.ids (e.g. ids: { "title": "hero-title" }) or object.id on items (e.g. features[0].id: "hero").
Option 1: meta.initialElementState
Override per-element initial state. Elements are hidden by default; use this to set visible: true for specific ids or override other props. Ids follow the pattern
s{index}-{path} (e.g. s0-tag, s0-title,
s1-features-0). engine.elements(slideIndex) lists all ids for a slide.
{
"meta": {
"title": "Reveal on Demand",
"initialElementState": {
"s0-tag": { "visible": false },
"s0-title": { "visible": false },
"s0-subtitle": { "visible": false }
}
},
"slides": [
{ "type": "statement", "tag": "…", "title": "…", "subtitle": "…" }
]
}
Option 2: elementControl.defaultVisible
Elements are hidden by default and cascade-reveal on slide enter. To show all elements immediately (legacy behavior): pass
elementControl: { defaultVisible: true } when creating Lumina or in deck meta.
const engine = new Lumina('#app', {
elementControl: { defaultVisible: true }
});
engine.load(deck);
Automatic reveal in sequence
By default, elements cascade-reveal automatically when entering a slide. For custom timing, use engine.element(id).show() (and optionally
.animate()). With ready and setTimeout you can
chain a custom sequence:
engine.on('ready', () => {
const ids = ['s0-tag', 's0-title', 's0-subtitle'];
ids.forEach((id, i) => {
setTimeout(() => engine.element(id).show(), (i + 1) * 700);
});
});
engine.load(deck);
Step-by-step: using the controller correctly (avoiding null elements)
engine.getElementById(id) returns null if the element is not mounted (e.g. its slide is not the current one). If you call engine.element(id).show() or .animate() when the node is null, the library does nothing with GSAP (no-op) and no error is thrown; but the effect is not visible. For reveal to work, the element must exist in the DOM when you call .show(). This is the pattern that works.
1. Register ready and slideChange before engine.load(deck). That way, when the deck finishes loading or you change slides, your callbacks are already registered.
2. In ready: the first slide is already mounted. Use setTimeout before each engine.element(id).show() to allow time for render and transitions (e.g. 700 ms per element).
3. In slideChange: when entering a slide with controlled elements, that slide's DOM mounts on change. Use setTimeout again before each .show() for that slide.
4. Order in your code: new Lumina(...) → engine.on('ready', ...) → engine.on('slideChange', ...) → engine.load(deck).
Full example (used by the layout-element-control demo):
const engine = new Lumina('#app', { loop: true, navigation: true });
// 1. ready: first slide mounted; setTimeout so the DOM is ready
engine.on('ready', () => {
['s0-tag', 's0-title', 's0-subtitle'].forEach((id, i) => {
setTimeout(() => engine.element(id).show(), (i + 1) * 700);
});
});
// 2. slideChange: on slide 1, reveal its elements with the same delay
engine.on('slideChange', ({ index }) => {
if (index === 1) {
['s1-tag', 's1-title', 's1-subtitle'].forEach((id, i) => {
setTimeout(() => engine.element(id).show(), (i + 1) * 700);
});
}
});
// 3. Load always after the listeners
engine.load(deck);
With this order and the setTimeouts, elements exist when .show() is called and you avoid null references in animations.
Animations
Elements cascade-reveal by default on slide enter. Customize with meta.reveal, slide.reveal, revealInSequence, presets, and stagger modes.
revealInSequence
Reveals slide elements one by one with optional stagger and animation. Runs automatically on slide enter when no custom slide.reveal: false or slide.timelineTracks. Call engine.revealInSequence(slideIndex?, options) manually for custom timing.
engine.on('ready', () => engine.revealInSequence(0, { delayMs: 500, preset: 'fadeUp' }));
engine.on('slideChange', (e) => engine.revealInSequence(e.index, { delayMs: 400 }));
engine.load(deck);
Options: delayMs, staggerMode (sequential | center-out | ends-in | wave | random), preset, from/to, duration, ease, hideFirst, only, exclude.
Presets
Use preset in revealInSequence or element(id).animate({ preset: 'fadeUp' }). Built-in: fadeUp, fadeIn, scaleIn, slideLeft, slideRight, zoomIn, blurIn, spring, drop, fadeOut.
Stagger modes
staggerMode controls the order in which elements are revealed: sequential (default), center-out, ends-in, wave, random. For random, use randomSeed for deterministic order.
Timeline (Remotion-style keyframes)
Drive element state from a progress 0–1 with slide.timelineTracks. Use engine.seekTo(progress) to scrub or engine.playTimeline(duration) to play. Works with any layout; the free layout is for absolutely positioned storytelling.
timelineTracks
Per-slide, define timelineTracks: { [elementId]: { "0": { opacity, x, y, scale, rotate?, visible? }, "0.3": {...}, "1": {...} } }. Keys are progress strings 0–1; values are interpolated linearly. Supported: opacity, x, y, scale, rotate, visible.
{
"type": "statement",
"title": "Keyframes",
"subtitle": "Scrub or play.",
"timelineTracks": {
"s0-tag": { "0": { opacity: 0, y: 20 }, "0.2": { opacity: 1, y: 0 }, "1": { opacity: 1 } },
"s0-title": { "0": { opacity: 0, x: -30 }, "0.4": { opacity: 1, x: 0 }, "1": { opacity: 1 } }
}
}
API
engine.seekTo(progress, slideIndex?)— scrub to 0–1. Updatesengine.timelineProgress.engine.playTimeline(durationSeconds?, slideIndex?)— returns[Promise, cancel]. Plays from 0 to 1 over the given seconds (default 5).element(id).animateToProgress(progress, keyframes)— apply keyframes for one element manually.
Free layout
type: "free" with elements: [{ type: "text"|"image"|"box", text?, src?, width?, height?, fontSize?, color?, backgroundColor?, ... }]. Elements are absolutely positioned; x, y in timelineTracks act as translate. Ids: s{N}-elements-0, s{N}-elements-1, etc.
Theming
Customize colors, fonts, and visual style with built-in presets or create your own theme.
Built-in Presets
Lumina comes with 8 beautiful theme presets. Pass the preset name as a string to instantly apply a complete look.
default
Clean blue on dark. Professional and modern.
ocean
Cyan accents on slate. Calm and focused.
midnight
Indigo on pure black. Bold and dramatic.
forest
Emerald green tones. Natural and fresh.
cyber
Neon pink futuristic. Sci-fi vibes.
latte
Light mode with warm amber. Elegant.
sunset
Orange to rose gradient. Warm and vibrant.
monochrome
Pure black and white. Timeless elegance.
Using a Preset
Pass the preset name as a string to the theme
option:
const engine = new Lumina('#app', {
theme: 'ocean' // 'midnight', 'forest', 'cyber', 'latte', 'sunset', 'monochrome'
});
engine.load(myDeck);
Complete Theme Configuration
Lumina v9 introduces 80+ CSS custom properties for full visual
customization.
Configure via themeConfig in your deck JSON or engine options.
🎨 Colors (25+ tokens)
| Property | CSS Variable | Description |
|---|---|---|
| Core Colors | ||
| primary | --lumina-color-primary | Main brand/accent color |
| secondary | --lumina-color-secondary | Complementary brand color |
| accent | --lumina-color-accent | Tertiary/accent highlights |
| background | --lumina-color-background | Main slide background |
| surface | --lumina-color-surface | Cards, panels, elevated surfaces |
| text | --lumina-color-text | Primary text color |
| textSecondary | --lumina-color-text-secondary | Secondary body text |
| muted | --lumina-color-muted | Subdued text, captions |
| Semantic Colors | ||
| success | --lumina-color-success | Positive actions (#22c55e) |
| warning | --lumina-color-warning | Caution states (#eab308) |
| danger | --lumina-color-danger | Errors, destructive (#ef4444) |
| info | --lumina-color-info | Informational highlights |
| UI Colors | ||
| border | --lumina-color-border | Default border color |
| borderSubtle | --lumina-color-border-subtle | Subtle/light borders |
| shadow | --lumina-shadow-color | Shadow color for elevation |
| Gradient Colors | ||
| gradientFrom | --lumina-gradient-from | Gradient start color |
| gradientVia | --lumina-gradient-via | Gradient middle (optional) |
| gradientTo | --lumina-gradient-to | Gradient end color |
✨ Effects
| Property | Type | Values | Default |
|---|---|---|---|
| Gradients | |||
| useGradients | boolean | true / false | true |
| gradientDirection | enum | 'to-t' | 'to-b' | 'to-l' | 'to-r' | 'to-tl' | 'to-tr' | 'to-bl' | 'to-br' | 'to-br' |
| Shadows | |||
| useShadows | boolean | true / false | true |
| shadowIntensity | enum | 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | 'md' |
| shadowColor | string | Any CSS color (rgba works best) | rgba(0,0,0,0.25) |
| Glassmorphism | |||
| useGlass | boolean | true / false (frosted glass panels) | true |
| glassOpacity | number | 0 to 1 (panel background opacity) | 0.03 |
| glassBlur | string | CSS blur value (e.g., '20px') | '20px' |
| glassBorderOpacity | number | 0 to 1 (subtle border opacity) | 0.05 |
| Ambient Orb | |||
| useOrb | boolean | true / false (background glow) | true |
| orbOpacity | number | 0 to 1 | 0.4 |
| orbBlur | string | CSS blur value | '120px' |
| orbSize | string | CSS size (vw, vh, px, %) | '60vw' |
| Animations | |||
| animationsEnabled | boolean | Master toggle for all animations | true |
| transitionDuration | string | CSS duration (e.g., '0.3s') | '0.3s' |
| transitionEasing | string | CSS easing function | cubic-bezier(0.16,1,0.3,1) |
| hoverScale | number | Scale on hover (1.0 = no scale) | 1.05 |
🧩 Component Tokens
| Property | CSS Variable | Default |
|---|---|---|
| Buttons | ||
| buttonRadius | --lumina-button-radius | 9999px (pill) |
| buttonPadding | --lumina-button-padding | 0.75rem 1.5rem |
| buttonFontWeight | --lumina-button-font-weight | 700 |
| buttonTextTransform | --lumina-button-text-transform | none |
| Cards | ||
| cardRadius | --lumina-card-radius | 1.5rem |
| cardPadding | --lumina-card-padding | 2rem |
| cardBorderWidth | --lumina-card-border-width | 1px |
| Timeline | ||
| timelineNodeSize | --lumina-timeline-node-size | 1rem |
| timelineLineWidth | --lumina-timeline-line-width | 2px |
| timelineNodeColor | --lumina-timeline-node-color | (uses primary) |
| Tags/Badges | ||
| tagPadding | --lumina-tag-padding | 0.25rem 1rem |
| tagRadius | --lumina-tag-radius | 9999px |
| tagFontSize | --lumina-tag-font-size | 0.75rem |
🔤 Typography
Font Families
heading: Headings (default: Outfit)body: Body text (default: Outfit)mono: Code (default: monospace)Font Sizes (--lumina-text-*)
Font Weights (--lumina-font-weight-*)
Line Heights (--lumina-leading-*)
📏 Spacing & Border Radius
Spacing (--lumina-space-*)
Border Radius (--lumina-radius-*)
Full themeConfig Example
// In your deck JSON
{
"meta": {
"theme": "default",
"themeConfig": {
"colors": {
"primary": "#8b5cf6",
"secondary": "#ec4899",
"gradientFrom": "#8b5cf6",
"gradientTo": "#ec4899"
},
"effects": {
"useGradients": true,
"useGlass": true,
"glassOpacity": 0.05,
"useOrb": true,
"orbOpacity": 0.4
},
"components": {
"cardRadius": "1.5rem",
"buttonRadius": "9999px"
}
}
}
}
Custom Theme Configuration
Pass a configuration object for full control over colors and fonts:
const engine = new Lumina('#app', {
theme: {
colors: {
primary: '#ec4899', // Pink accent
background: '#1a1a2e', // Dark purple bg
text: '#eaeaea', // Light text
muted: '#888888' // Subdued text
},
fonts: {
heading: 'Outfit, sans-serif',
body: 'Inter, sans-serif',
mono: 'Fira Code, monospace'
}
}
});
Partial Overrides
You don't need to specify every property. Lumina merges your values with the default theme:
// Only change the primary color
const engine = new Lumina('#app', {
theme: {
colors: {
primary: '#f59e0b' // Amber accent
}
}
});
// Everything else uses defaults!
Custom Fonts
For custom fonts, load them via Google Fonts or your own stylesheet first:
<!-- In your HTML head -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link href="https://fonts.googleapis.com/css2?family=Outfit:wght@400;700&family=Rajdhani&display=swap" rel="stylesheet">
Then reference them in your theme config:
const engine = new Lumina('#app', {
theme: {
fonts: {
heading: 'Outfit, sans-serif',
body: 'Rajdhani, sans-serif'
}
}
});
Pro Tips
- 🎨 Brand colors: Set
primaryto your brand color for instant recognition - 🌙 Dark vs Light: Use
lattepreset for light mode presentations - 📱 Accessibility: Ensure sufficient contrast between
textandbackground - 🔤 Performance: Only load font weights you actually use (400, 700)
Speaker Notes
Open a separate presenter view with notes, timer, and bidirectional navigation controls.
Adding Notes to Slides
Add the notes property to any slide. Notes are only visible in the presenter
view, not on the main display.
{
"type": "statement",
"title": "Welcome",
"subtitle": "An introduction to our platform",
"notes": "Greet the audience. Mention key stakeholders. Time: 2 minutes."
}
Opening the Presenter View
Call openSpeakerNotes() on your Lumina instance to open the presenter window.
const engine = new Lumina('#app');
engine.load(deckData);
// Open presenter view
engine.openSpeakerNotes();
// Check if open
if (engine.isSpeakerNotesOpen) {
console.log('Presenter view active');
}
// Close programmatically
engine.closeSpeakerNotes();
Presenter View Features
- Current Notes — Formatted notes for the current slide
- Next Slide Preview — Title and type of the upcoming slide
- Timer — Start/pause/reset presentation timer
- Navigation — Synced controls (changes reflect in main window)
- Connection Status — Visual indicator of sync state
Keyboard Shortcuts (Presenter View)
| Key | Action |
|---|---|
| → / Space / Enter | Next slide |
| ← / Backspace | Previous slide |
| T | Toggle timer |
| R | Reset timer |
Pro Tip
Position the presenter window on your secondary monitor while the presentation runs on the main display. Navigation from either window stays synchronized.
The Agent Protocol
Lumina is the first presentation engine designed for Agentic AI.
Large Language Models (LLMs) are great at "What" (Content) but struggle with "How" (Pixel-perfect CSS). Lumina solves this by acting as a Semantic Interface Layer.
The Agent's Job
- Generate Text Content
- Determine Structure
- Choose Semantic Layouts
Lumina's Job
- 60fps Animations
- Responsive Typography
- Interactive State
The Protocol
Agents communicate with Lumina via a JSON format that is strict enough for deterministic rendering but loose enough for LLMs.
Token Optimization
Reduce output size with short property aliases. Less characters = faster rendering and lower costs.
Standard JSON ~95 characters
{
"type": "statement",
"title": "Quarterly Review",
"subtitle": "Growth is exceeding expectations."
}
Optimized JSON ~70 characters
{
"type": "statement",
"t": "Quarterly Review",
"s": "Growth is exceeding expectations."
}
Supported Aliases
Both full property names and aliases work interchangeably. Mix and match as needed.
| Full Key | Alias | Used In |
|---|---|---|
| title | t | All layouts |
| subtitle | s | Statement, Timeline, Steps |
| description | d | Features, Timeline items, Steps items |
| features | fs | Features layout |
| timeline | tl | Timeline layout |
| steps | st | Steps layout |
| paragraphs | p | Half layout |
| image | img | Half layout |
| imageSide | side | Half layout |
How It Works
Lumina's normalizer automatically expands aliases to full property names before rendering. You can use standard JSON for readability or aliases for efficiency—both produce identical results.
Streaming & Realtime
Lumina enables a "Type & See" experience. Using our partial parser, you can feed raw LLM streams directly into the engine.
Preview UI Render
Layout Gallery
Lumina provides 5 core layouts optimized for different types of information. Click Visualize to load them into the Streaming Demo.
Statement
Best for: Titles, Quotes, Big Ideas.
{{ EXAMPLES.statement }}
Features
Best for: Lists, Grids, Stats, Benefits.
{{ EXAMPLES.features }}
Timeline
Best for: Roadmaps, History, Changelogs.
{{ EXAMPLES.timeline }}
Auto-Layouts
Sometimes the Agent doesn't know which layout is best. Just use type: 'auto'.
Lumina analyzes the content structure to pick the best view automatically.
Detection Priority
- If
timelinearray exists -> Timeline Layout - If
stepsarray exists -> Steps Layout - If
featuresarray exists -> Features Layout - If
imageexists -> Half Layout - Otherwise -> Statement Layout
Example: Multi-Slide Auto Detection
Each slide uses type: "auto" but renders
differently based on its content structure.
{
"slides": [
// Renders as Statement (no special arrays detected)
{
"type": "auto",
"title": "Welcome to Our Platform",
"subtitle": "The future of presentations"
},
// Renders as Features (features array detected)
{
"type": "auto",
"title": "Why Choose Us",
"features": [
{ "title": "Fast", "desc": "60fps animations", "icon": "fa-bolt" },
{ "title": "Simple", "desc": "JSON-first", "icon": "fa-code" },
{ "title": "Smart", "desc": "AI-ready", "icon": "fa-brain" }
]
},
// Renders as Timeline (timeline array detected)
{
"type": "auto",
"title": "Our Journey",
"timeline": [
{ "date": "2023", "title": "Concept", "description": "The idea was born" },
{ "date": "2024", "title": "Launch", "description": "V1.0 released" }
]
},
// Renders as Steps (steps array detected)
{
"type": "auto",
"title": "Getting Started",
"steps": [
{ "step": 1, "title": "Install", "description": "npm install lumina-slides" },
{ "step": 2, "title": "Import", "description": "Import Lumina class" },
{ "step": 3, "title": "Create", "description": "Define your slides" }
]
},
// Renders as Half (image property detected)
{
"type": "auto",
"title": "Visual Storytelling",
"image": "https://images.unsplash.com/...",
"paragraphs": ["Combine text and visuals seamlessly."]
}
]
}
Pro Tip
Using type: "auto" simplifies prompt
engineering for AI agents. The LLM only needs to provide the data structure, and Lumina
will handle the visual representation automatically.
State & Feedback Loop
Use engine.exportState() to get the current state for your LLM or agent. It returns a frozen object with status, currentSlide ({ index, id, type, title }), narrative (e.g. "User is on slide 3. Session: clicked 'Learn More' → next."), engagementLevel ("High" or "Low"), and history (recorded actions). Add this to your prompt for context-aware replies.
const state = engine.exportState();
// "User is on slide ${state.currentSlide.index + 1} (${state.currentSlide.type}). ${state.narrative}"
Statement Slide
High-impact titles, opening covers, or emphatic quotes. Punchy and minimal. Supports sizing, background, notes, class, timelineTracks, reveal, ids, meta (SlideBase).
Configuration
| Property | Type | Description |
|---|---|---|
| type | "statement" | Required. Identifies the layout. |
| title | string | Main headline. Keep it short (3–6 words). Alias: t. |
| subtitle | string? | Optional supporting text. Alias: s. |
| tag | string? | Small eyebrow tag above the title. |
Element ids: tag (if set)→s{N}-tag, title→s{N}-title, subtitle (if set)→s{N}-subtitle. With slide.id: {id}-tag, etc. Override via slide.ids. Element Control has the full table.
Example
Half / Split Slide
Image or video on one side, text on the other. Product showcases, "about me", explainers. Provide image or video (one required). Plus SlideBase (sizing, background, notes, class, timelineTracks, reveal, ids, meta).
Configuration
| Property | Type | Description |
|---|---|---|
| type | "half" | Required. |
| image | string? | Image URL. Omit if using video. |
| video | VideoProperties? | { type: "video", src, poster?, autoplay?, loop?, muted?, controls?, className? }. Use instead of image. |
| imageSide | "left" | "right" | Which side the media is on. Default: "left". |
| imageClass | string? | Extra CSS class on the img (e.g. filters, scale). |
| tag | string? | Eyebrow label above the title. |
| title | string | Headline. |
| paragraphs | string[] | Array of text blocks. Rendered as separate <p>. |
| cta | string? | Button label. Click emits action with type: "cta", label. |
Element ids: media, tag (if set), title, paragraphs, cta (if set) → s{N}-media, s{N}-tag, etc. Element Control has the full table.
Example
Features Slide
Grid of cards for benefits, stats, or services. Responsive: 1 column on mobile, auto-fit on desktop. SlideBase (sizing, background, notes, class, timelineTracks, reveal, ids, meta) applies.
Slide configuration
| Property | Type | Description |
|---|---|---|
| type | "features" | Required. |
| title | string | Section header. |
| description | string? | Context below the header. Alias: d, desc. |
| features | FeatureItem[] | Array of feature cards. See FeatureItem below. |
FeatureItem (each card)
| Property | Type | Description |
|---|---|---|
| title | string | Card title. |
| description | string | Body text. Alias: desc. |
| icon | string? | Icon name. Phosphor: ph-star, ph-check; or star (prefix ph- applied). |
| class | string? | Extra CSS class on the card. Use "" if omitted. |
| id | string? | Override for engine.element(id). Default: s{N}-features-{i}. |
Element ids: header, title, description (if set), features.0, features.1, … → s{N}-header, s{N}-title, s{N}-features-0, etc. Element Control has the full table.
Example
Timeline Slide
Vertical chronological list for events, roadmaps, or history. Alternating left/right on desktop. Not the same as slide.timelineTracks (keyframe animation). SlideBase applies.
Slide configuration
| Property | Type | Description |
|---|---|---|
| type | "timeline" | Required. |
| title | string | Header. Alias: t. |
| subtitle | string? | Subheader. Alias: s. |
| timeline | TimelineItem[] | Ordered events. See TimelineItem below. Alias: tl. |
| lineClass | string? | Extra CSS class on the vertical connector line. |
TimelineItem (each event)
| Property | Type | Description |
|---|---|---|
| date | string | Time marker (e.g. "Q1 2024", "Jan 15", "Now"). |
| title | string | Event title. Alias: t. |
| description | string | Details. Alias: desc, d. |
| icon | string? | Phosphor icon. ph-* or short name. |
| id | string? | Override for element control. Default: s{N}-timeline-{i}. |
Element ids: title, subtitle (if set), timeline.0, timeline.1, … → s{N}-title, s{N}-subtitle, s{N}-timeline-{i}. Element Control has the full table.
Example
Steps Slide
Numbered steps for tutorials, how-to guides, or process flows. Responsive grid. SlideBase applies.
Slide configuration
| Property | Type | Description |
|---|---|---|
| type | "steps" | Required. |
| title | string | Process or section header. |
| subtitle | string? | Optional subheader. |
| steps | StepItem[] | Ordered steps. See StepItem below. Alias: st. |
StepItem (each step)
| Property | Type | Description |
|---|---|---|
| step | string | Badge label: "01", "1", "A", etc. |
| title | string | Step title. |
| description | string? | Body text. |
| icon | string? | Phosphor icon; shown as watermark. ph-* or short name. |
| class | string? | Extra CSS class on the step card. |
| id | string? | Override for element control. Default: s{N}-steps-{i}. |
Element ids: header, title, subtitle (if set), steps.0, steps.1, … → s{N}-header, s{N}-title, s{N}-steps-{i}. Element Control has the full table.
Example
Flex Layout
Flow-based layout with semantic sizing (quarter, half, full, etc.). No coordinates—ideal for LLMs. SlideBase applies. Top-level and content children can have size?: FlexSize.
Slide options
| Property | Type | Description |
|---|---|---|
| type | "flex" | Required. |
| direction | "horizontal" | "vertical" | Main flow. Default: "horizontal". |
| gap | SpacingToken | none | xs | sm | md | lg | xl | 2xl. Default: "none". |
| padding | SpacingToken | Container padding. Default: "none". |
| halign | left | center | right | Default: "left". |
| valign | top | center | bottom | Default: "top". |
| elements | FlexElement[] | Flow order. Each: type + type-specific props + optional size (FlexSize). |
FlexSize (element width)
Optional size on elements: auto (flex) | quarter (25%) | third (33%) | half (50%) | two-thirds (66%) | three-quarters (75%) | full (100%).
Element types (top-level and in content)
| type | Properties | Description |
|---|---|---|
| content | elements, direction?, valign?, halign?, gap?, padding?, size?, class?, style?, id? | Groups children with alignment. direction: horizontal|vertical (default: vertical). Supports nested content, html, image, and all child elements. class and style for custom styling. |
| image | src, alt?, fill?, fit?, position?, rounded?, href?, target?, class?, style?, size?, id? | Media. fill: edge-to-edge. fit: cover|contain|fill|none|scale-down. position: object-position (e.g., "top center"). href+target: link. rounded: none|sm|md|lg|xl|full. style: custom CSS. |
| html | html, class?, style?, size?, id? | Raw HTML content. Renders any HTML string. Supports class and style for customization. Automatically styled to match Lumina theme. |
| video | src, poster?, autoplay?, loop?, muted?, controls?, fill?, fit?, rounded?, class?, size?, id? | Video element. Same fill/fit/rounded as image. |
| title | text, size? (lg|xl|2xl|3xl), align?, id? | Heading. align: left|center|right. Top-level only: optional FlexSize size. |
| text | text, align?, muted?, size?, id? | Paragraph. muted: subtle style. |
| bullets | items: string[], size?, id? | Unordered list. |
| ordered | items: string[], size?, id? | Numbered list. |
| button | label, action?, actionType?, href?, gotoSlide?, target?, variant?, fullWidth?, size?, id? | actionType: event|url|slide|download. url: href+target. slide: gotoSlide. variant: primary|secondary|outline|ghost. |
| timeline | items: TimelineItem[], compact?, size?, id? | Embedded timeline. compact: tighter layout. |
| stepper | items: StepItem[], compact?, size?, id? | Embedded steps. |
| spacer | size?: SpacingToken, id? | Vertical gap. size: none|xs|sm|md|lg|xl|2xl. Default: md. |
SpacingToken: none | xs | sm | md | lg | xl | 2xl. Element ids: elements.0, elements.1, …, elements.i.elements.j (content) → s{N}-elements-{i}, s{N}-elements-{i}-elements-{j}. Element Control has the full table.
Content container (direction, valign, halign, gap, padding)
Direction: horizontal | vertical (default: vertical). Controls layout direction of child elements.
Defaults: direction vertical, valign center, halign left, gap md, padding lg.
Nested content: Content containers can be nested inside other content containers for complex layouts. Supports unlimited nesting levels.
HTML Element
The html element allows you to insert raw HTML content into your flex layout. This is useful for custom formatting, embedded content, or any HTML that isn't covered by other element types.
Example:
{{
`{
"type": "html",
"html": "Insert any HTML here.
- List item
",
"class": "custom-class",
"style": { "maxWidth": "600px" }
}`}}
The HTML is automatically styled to match Lumina's theme. Common HTML elements (h1-h6, p, a, ul, ol, li) are styled with Lumina CSS variables.
Enhanced Image Element
The image element now supports advanced positioning and styling options:
fit:cover|contain|fill|none|scale-down- Controls how the image fits its containerposition: string (e.g.,"top center","left bottom") - Controls object-position CSS propertystyle: object - Custom CSS styles as key-value pairsclass: string - Custom CSS class names
Example:
{{
`{
"type": "image",
"src": "photo.jpg",
"fit": "contain",
"position": "top center",
"rounded": "lg",
"style": { "border": "2px solid var(--lumina-color-primary)" }
}`}}
Example
Chart Slide
Data visualization with Chart.js. Types: bar, line, pie, doughnut. Requires chart.js as an optional peer. SlideBase applies.
Configuration
| Property | Type | Description |
|---|---|---|
| type | "chart" | Required. |
| chartType | "bar" | "line" | "pie" | "doughnut" | Type of chart to render. |
| title | string? | Chart title (optional). |
| subtitle | string? | Subtitle text (optional). |
| data | ChartData | Object with labels and datasets.
|
Element ids: title (if set), subtitle (if set), chart → s{N}-title, s{N}-subtitle, s{N}-chart. Element Control has the full table.
Data Structure
| Property | Type | Description |
|---|---|---|
| data.labels | string[] | X-axis labels or pie segment names. |
| data.datasets | Dataset[] | Each with label, values, and
optional color. |
| dataset.color | string? | c:p (primary), c:s (secondary),
c:m (muted), or hex.
|
Chart Types
Bar Chart
Best for comparing discrete categories
Use bar charts to compare values across categories. Ideal for revenue by quarter, sales by region, or any categorical comparison.
Line Chart
Best for trends over time
Use line charts to show trends and changes over time. Perfect for growth metrics, stock prices, or any time-series data.
Pie Chart
Best for showing proportions
Use pie charts to show how parts make up a whole. Ideal for market share, budget allocation, or percentage distributions.
Doughnut Chart
Modern alternative to pie charts
Similar to pie charts but with a hollow center. The modern look works great for dashboards and can display a metric in the center.
Advanced: Multiple Datasets
Bar and line charts support multiple datasets for comparisons. Each dataset gets its own color and legend entry.
Color Tokens
| Token | Maps To | Default |
|---|---|---|
| c:p | --lumina-colors-primary | #3b82f6 |
| c:s | --lumina-colors-secondary | #10b981 |
| c:m | --lumina-colors-muted | #9ca3af |
| #ec4899 | Direct hex color | Custom |
Pro Tips
- 📊 Bar charts work best with 4-8 categories
- 📈 Line charts need at least 3 data points for smooth curves
- 🥧 Pie/Doughnut should have 3-6 segments max for clarity
- 🤖 LLM Tip: Have agents extract tabular data from CSVs and generate charts automatically
Video Slide
Full-screen video. video (VideoProperties) is required. Optional title overlay at bottom-left (on hover). SlideBase applies.
Configuration
| Property | Type | Description |
|---|---|---|
| type | "video" | Required. |
| video | VideoProperties | Required. src, and optionally poster, autoplay, loop, muted, controls, className. |
| title | string? | Caption overlay at bottom-left, visible on hover. |
VideoProperties
| Property | Type | Description |
|---|---|---|
| src | string | Required. Video URL. |
| poster | string? | Poster image URL. |
| autoplay | boolean? | Default: false. |
| loop | boolean? | Default: false. |
| muted | boolean? | Default: false. Often true with autoplay for autoplay to work. |
| controls | boolean? | Default: false. Show play/seek/volume. |
| className | string? | CSS class for the title overlay container. |
Example
Element ids: video, title (if set) → s{N}-video, s{N}-title. Element Control has the full table.
Custom HTML Slide
Raw html and optional css. For iframes, D3, or brand-specific layouts. SlideBase applies. Sanitized: <script> and on* handlers removed.
Configuration
| Property | Type | Description |
|---|---|---|
| type | "custom" | Required. |
| html | string | Raw HTML content to render. |
| css | string? | Optional scoped CSS styles. |
Basic Example
Render any HTML structure with full styling control.
Use Cases
- Embedding iframes: YouTube videos, maps, or external widgets
- Custom visualizations: D3.js charts, SVG animations
- Brand-specific layouts: Complex designs not covered by built-in layouts
- Interactive components: Forms, quizzes, or custom buttons
Sanitization
Before rendering, the following are removed for security: <script> tags, on* attribute handlers (e.g. onclick=), and javascript: URLs. Sanitize or escape user-generated HTML for other XSS vectors if needed.
The css string is injected into document.head as a <style> and removed when the slide unmounts.
Pro Tips
- 🎨 Scoped CSS: Styles are injected in
<head>; use unique class names to avoid clashes with Lumina. - 📱 Responsive: Use CSS Grid or Flexbox with relative units for mobile support
- 🤖 LLM Usage: Custom slides are great when the AI needs complete creative freedom
Diagram Slide
Node-based diagram (Vue Flow). nodes and edges required. In Studio: drag-and-drop, connect, resize. SlideBase applies.
Configuration
| Property | Type | Description |
|---|---|---|
| type | "diagram" | Required. |
| title | string? | Optional header. |
| nodes | object[] | Vue Flow: id, type (default|input|...), position: { x, y }, label, data? (shape, style). |
| edges | object[] | Vue Flow: id, source, target, sourceHandle?, targetHandle?. |
| config | object? | fitView?: boolean and other Vue Flow options. |
Element ids: nodes.0, nodes.1, … and edges.0, … Use nodes[i].id and edges[i].id in JSON so engine.elements() aligns with the DOM. Fallback: s{N}-nodes-{i}, s{N}-edges-{i}. Element Control has the full table. Studio: palette, drag, connect, resize.
Free / Composition Slide
Absolutely positioned elements for Remotion-style storytelling. Three types: text, image, box. Position and animation are driven by slide.timelineTracks (x, y as translate). SlideBase applies.
Slide configuration
| Property | Type | Description |
|---|---|---|
| type | "free" | Required. |
| elements | FreeElement[] | Array of text, image, or box. See FreeElement below. |
FreeElement (each item)
| Property | Type | Description |
|---|---|---|
| type | "text" | "image" | "box" | Required. text: string content. image: use src. box: colored block, use backgroundColor. |
| text | string? | For type: "text". Rendered as block. |
| src | string? | For type: "image". Image URL. |
| width | number | string? | CSS width. Number → px. String: e.g. "50%", "10rem". |
| height | number | string? | CSS height. Same as width. |
| fontSize | number | string? | For text. Number → px. |
| color | string? | Text color. CSS value. |
| fontWeight | string? | e.g. "bold", "600". |
| backgroundColor | string? | For type: "box". CSS color. |
| id | string? | Override for timelineTracks and engine.element(id). Default: s{N}-elements-{i}. |
Element ids: elements.0, elements.1, … → s{N}-elements-{i}. Override with elements[i].id. Element Control has the full table.
Positioning and animation (timelineTracks)
Elements are placed at left: 0; top: 0 by default. To move or animate them, set slide.timelineTracks on the slide (SlideBase). Keys are element ids: s{N}-elements-0, s{N}-elements-1, or the element’s id. Value: keyframes from progress string to state:
opacity(0–1)x,y(number, px) → applied astranslate(x, y)scale,rotatevisible(boolean)
Keyframe keys: "0", "0.25", "0.5", "1", etc. Linear interpolation. Use engine.seekTo(progress) or engine.playTimeline(duration).
Example
{
"type": "free",
"elements": [
{ "type": "text", "text": "Hello", "fontSize": 48 },
{ "type": "box", "width": 200, "height": 100, "backgroundColor": "#3b82f6", "id": "myBox" }
],
"timelineTracks": {
"s0-elements-0": { "0": { opacity: 0, y: 20 }, "0.5": { opacity: 1, y: 0 } },
"myBox": { "0": { x: -50, visible: false }, "0.5": { x: 100, visible: true } }
}
}
Auto Strategy
Picks a layout from the data shape. Use type: "auto"; the engine resolves to one of: Chart, Timeline, Steps, Features, Half, Statement. All SlideBase and layout-specific props are passed through to the chosen layout. Best for LLMs and rapid prototyping.
Resolution order (first match wins)
chartTypeanddata.datasets→ Charttimeline(array) → Timelinesteps(array) → Stepsfeatures(array) → Featuresimageorvideo→ Half- else → Statement (
title,subtitle)
Provide the fields required by the target layout (e.g. features must be FeatureItem[] if resolved to Features).
Live Examples
Use the navigation arrows to see how each slide
renders with the same type: "auto" but different data structures.