Skip to content

Front matter reference

The front matter of a slide sets its theme, layout, transition and other options. This page lists every property that Demo Time reads. A custom layout, header or footer can read any other property you add.

---
theme: frost
layout: video
video: .demo/assets/intro.mp4
controls: true
---
# Welcome

In the editor

In a slide file, Demo Time helps you write the front matter of the slide the cursor is in:

  • Completion suggests the properties the slide doesn’t set yet, with the properties of its layout first, and the values of layout, theme, transition, controlsPosition, progress and the true/false properties.
  • Hover over a property shows its description, values, default, layouts and how it applies from the document front matter, with a link to its documentation.
  • The Problems panel reports misspelled properties and invalid values. See problems in slide files.

Document front matter

The front matter at the top of the file is the document front matter. The Document front matter applies to column of the tables tells how a property in it applies to the other slides of the file:

  • Every slide: every slide uses the value, even when it sets its own.
  • Slides that don’t set it: every slide that doesn’t set its own value uses it. This is also the case for properties that Demo Time doesn’t know, like the ones of a custom layout.
  • First slide only: the other slides don’t use it.

Properties

Paths are relative to the workspace folder.

All layouts

PropertyTypeDefaultDocument front matter applies toDescription
themestringdefaultEvery slideThe built-in theme of the slide. Values: default, minimal, monomi, unnamed, quantum, frost, pixels. More
layoutstringdefaultFirst slide onlyThe layout of the slide. Values: default, center, intro, section, quote, image, video, image-right, image-left, two-columns, animated. More
transitionstringNo transitionSlides that don’t set itThe transition to show the slide with. Values: fadeIn, slideRight, slideLeft, slideUp, slideDown, zoomIn, zoomOut, rotateIn, rotateOut. More
customThemepath or URL-Every slidePath (relative to the workspace folder) or URL of a CSS file with your own theme, which builds on the theme. More
customLayoutpath-First slide onlyPath (relative to the workspace folder) of a Handlebars template with your own layout. More
headerHandlebars templateThe demoTime.slideHeaderTemplate settingSlides that don’t set itHandlebars template for the header of the slide. It can use the front matter properties and the header and footer placeholders. More
footerHandlebars templateThe demoTime.slideFooterTemplate settingSlides that don’t set itHandlebars template for the footer of the slide. It can use the front matter properties and the header and footer placeholders. More
progressstringThe demoTime.slideProgressBar settingSlides that don’t set itShows (true, top or bottom) or hides (false) the progress bar on the slide. true uses the position of the demoTime.slideProgressBar setting, or the bottom when the setting is none. Values: true, false, top, bottom. More
titlestring-Slides that don’t set itThe title of the slide in the slide navigator and overview when the slide has no heading. Header and footer templates can read it with {{title}}.
datestringToday’s dateSlides that don’t set itThe date that the {{date}} placeholder of header and footer templates shows. More
slideTitlestringThe first heading of the slideSlides that don’t set itOverrides the {{slideTitle}} placeholder of header and footer templates. More
sceneTitlestringThe title of the scene that opens the slideSlides that don’t set itOverrides the {{sceneTitle}} placeholder of header and footer templates. More
actTitlestringThe title of the act that opens the slideSlides that don’t set itOverrides the {{actTitle}} placeholder of header and footer templates. More
presentationTitlestringThe demoTime.presentationTitle setting, or the name of the workspace folderSlides that don’t set itOverrides the {{presentationTitle}} placeholder of header and footer templates. More
autoAdvanceAfternumber-First slide onlyGoes to the next slide or scene after this number of seconds. More
hidebooleanfalseFirst slide onlySkips the slide while presenting. A hidden slide is not counted in the slide numbers. More
autoFitbooleanfalseSlides that don’t set itScales the content down, to at least 50%, when it doesn’t fit on the slide. More
imagepath or URL-First slide onlyPath (relative to the workspace folder) or URL of an image. The image-left and image-right layouts show it next to the content, the other layouts as the background of the slide. More
backgroundstringThe background of the themeSlides that don’t set itThe background of the slide: a CSS colour ("#1e3a8a"), a gradient ("linear-gradient(135deg, #1e3a8a, #9333ea)"), or the path (relative to the workspace folder) or URL of an image. Put a value with a # between quotes. An image that the layout shows as the background takes precedence. More
classstring-Slides that don’t set itOne or more CSS classes, separated by spaces, that are added to the .slide__layout element of the slide, so a custom theme can style it. More

Video layout

PropertyTypeDefaultDocument front matter applies toDescription
videopath or URL-Slides that don’t set itPath (relative to the workspace folder) or URL of the video. A custom layout can use it too. More
controlsbooleanfalseSlides that don’t set itShows the video controls. Without controls, the video plays as a muted background that loops. More
autoplaybooleantrue, or false for a video with controlsSlides that don’t set itStarts the video, or the drawing of the animated SVG, when the slide opens. A video that starts automatically is muted.
autoPlayboolean-Slides that don’t set itAnother spelling of autoplay for the video layout. More
loopbooleanfalseSlides that don’t set itLoops a video with controls. A video without controls always loops. More
mutedbooleanfalseSlides that don’t set itMutes a video with controls that doesn’t start automatically. Other videos are always muted. More
playsInlinebooleanfalseSlides that don’t set itPlays a video with controls inline on mobile devices instead of full screen. A video without controls always plays inline. More
playbackRatenumber1Slides that don’t set itThe playback speed of the video, like 0.5 or 2. More

Animated SVG layout

PropertyTypeDefaultDocument front matter applies toDescription
autoplaybooleantrue, or false for a video with controlsSlides that don’t set itStarts the video, or the drawing of the animated SVG, when the slide opens. A video that starts automatically is muted.
svgFilepath-Slides that don’t set itPath (relative to the workspace folder) of the SVG file to draw. Required. More
animationSpeednumber100Slides that don’t set itDrawing speed in pixels per second. Higher values draw faster. More
textTypeWriterEffectbooleantrueSlides that don’t set itTypes the text of the SVG character by character. More
textTypeWriterSpeednumber20Slides that don’t set itTyping speed in milliseconds per character. Lower values type faster. More
skipAnimationbooleanfalseSlides that don’t set itShows the complete SVG right away, without drawing it. More
invertLightAndDarkColoursbooleanfalseSlides that don’t set itInverts the light and dark colours of the SVG, for contrast on a dark theme. More
controlsPositionstringbottomRightSlides that don’t set itThe position of the play, reset and skip controls, or none to hide them. Values: topLeft, topRight, bottomLeft, bottomRight, none. More

JSON schema

The properties are also available as a JSON schema, for other tools that read or write Demo Time slides:

https://demotime.show/slide.schema.json

Each property has an x-demotime object with its inheritance (always, fallback or firstSlide), the layouts that use it, and a link to its documentation.