Skip to content

Configuration

A deck’s settings come from three layers, each over the one before: the engine’s defaults, the deck’s headmatter (the YAML block at the top of deck.mdx), and deck.config.ts. Every setting is optional. The nested groups live, remote, drawings, seoMeta and glossary merge one level deep, so setting live.turnstile keeps live.api.

deck.config.ts
import type { DeckConfigInput } from "@kadal/deck";
export const config: DeckConfigInput = {
colorScheme: "auto",
transition: "slide",
slideNumber: "c/t",
live: { api: "/api", room: null },
};

Talk facts and the look (title, author, theme, themes, addons, fonts) belong in the headmatter: the Vite plugin reads theme and addon packages from there. deck.config.ts is for engine settings and anything that needs code.

npx kadal-deck info deckpnpm exec kadal-deck info deckyarn kadal-deck info deckbunx kadal-deck info deck prints every setting with its type and default, info slide every slide key, and @kadal/deck/schema/frontmatter.json is the same list as a JSON Schema for your editor (the VS Code extension uses it for completions).

Setting Type Default Meaning
title string "Untitled deck" the deck’s title: the browser tab, the table of contents, link previews, publish
author string "" who gives the talk; the PDF’s author, and wherever the theme shows it
info string "" a line about the deck (Markdown); the page’s description
lang string "" the page’s language: <html lang> and og:locale
favicon string "" the tab icon: a file in public/ (/logo.svg) or a URL; also the offline app’s icon
seoMeta record {} link-preview and search tags: ogImage (auto photographs slide 1 into og-image.png at build; or a path or URL), ogUrl, ogTitle, ogDescription, twitterCard, twitterSite, canonical, themeColor; any other key becomes a <meta> tag of its own
defaults frontmatter {} frontmatter every slide gets unless it sets the key itself, e.g. { layout: center }; a theme’s defaults sit beneath
download boolean | string false a Download button beside the theme menu: true offers the PDF kadal-deck build prints (else /export); a path or URL links that file. See Export
Setting Type Default Meaning
width, height number 1920, 1080 the authored size; the stage scales uniformly to any viewport
aspectRatio, canvasWidth number another way to set the size: canvasWidth is the width and aspectRatio (16/9 = 1.777…) gives the height
margin number 0 fraction of the viewport left empty around the stage
minScale, maxScale number 0.2, 2 bounds on the stage’s scale
center boolean false vertically centre the default layout’s content, as reveal.js does (the other layouts place their own); kadal-deck import reveal writes true
disableLayout boolean false no scaling or centring: the stage is the window (or an embedded deck’s element) at its own size, and you lay the slides out yourself
autoFit boolean true scale down a slide whose content overflows
view "slide" | "scroll" "slide" the scroll view reads the deck as one page
scrollProgress "auto" | boolean "auto" the scroll view’s progress bar
scrollSnap "mandatory" | "proximity" | false "mandatory" snapping in the scroll view
scrollActivationWidth number 0 viewport width under which the scroll view switches on by itself; 0 never does
scrollLayout "compact" | "full" "compact" the scroll view’s page: compact makes each slide as wide as the viewport; full gives each slide the whole viewport, letterboxed, as reveal.js does
Setting Type Default Meaning
theme string "minimal" the starting theme: a built-in (minimal, rla, stack, or none for no styles), a package (seriph finds @kadal/theme-seriph), or a folder (./theme). See Themes
themes string[] ["minimal", "rla", "stack"] the themes the theme menu offers, resolved like theme
themeConfig record {} the theme’s settings; each key becomes --theme-<key> on the deck root
addons string[] [] addon packages: qr finds @kadal/addon-qr, then kadal-addon-qr
fonts string[] | object [] Google Fonts families as written ("Inter:wght@400;600"), or { sans, heading, serif, mono, weights, italic, provider, local, fallbacks }. See Fonts
layers { presenter, overview } { presenter: true, overview: false } where the global and slide layers draw besides the deck, print and export
colorScheme "auto" | "light" | "dark" "auto" the starting scheme; auto follows the system
transition none · fade · slide · convex · concave · zoom · view-transition "slide" between slides, or a name from transitions
transitions record {} your own transitions: { flip: { in: flip-in, out: flip-out, back? } }. See Your own transitions
transitionSpeed "default" | "fast" | "slow" "default"
backgroundTransition as transition "fade" between slide backgrounds
parallaxBackgroundImage string one large image under every slide that moves a little with each slide, as reveal.js draws it
parallaxBackgroundSize, parallaxBackgroundHorizontal, parallaxBackgroundVertical string, number, number its CSS background-size, and the pixels it moves per horizontal and per vertical slide (worked out from the image when left out)
lineNumbers boolean false line numbers on every code block, magic moves and Monaco editors included; a block’s own {lines:false} opts out
magicMoveDuration number (ms) 800 magic-move animation length
selectable boolean true slide text can be selected
comark boolean false Comark syntax in the slides (mdc: true is the older name)
Setting Type Default Meaning
controls boolean | "speaker" true the arrow controls; speaker shows them only in the presenter view
controlsLayout "bottom-right" | "edges" "bottom-right" where they sit
controlsTutorial boolean true hint at the first vertical stack
controlsBackArrows "faded" | "hidden" | "visible" "faded"
progress boolean true the progress bar
slideNumber boolean | "h.v" | "h/v" | "c" | "c/t" false the slide number and its format; in deck.config.ts, a function of { h, v, click, index, total, id }
showSlideNumber "all" | "print" | "speaker" "all" where the number appears: all the deck, every printed page and the presenter view; print only printed pages; speaker only the presenter view
keyboard boolean | record true keyboard navigation; a map rebinds or unbinds keys: { KeyQ: overview, KeyD: null }. reveal.js’s keyCodes and method names read too ({ 13: toggleOverview }), and a function in deck.config.ts
keyboardCondition "focused" | null null focused: the deck takes keys only while it has focus (the default for an embedded deck); a function of the key in deck.config.ts
contextMenu boolean | "dev" | "build" true the right-click menu on slides; dev/build: only there
touch boolean true swipe navigation
mouseWheel boolean false wheel navigation
overview boolean true the overview (O)
jumpToSlide boolean true : or g to jump
search boolean true / to search
zoom boolean true Alt-click zooms into a point
help boolean true ? for the key sheet
pause boolean true B to black out
loop boolean false wrap from the last slide to the first
rtl boolean false right-to-left
navigationMode "default" | "linear" | "grid" "default" how arrows move between stacks: linear walks every slide, grid keeps columns aligned
shuffle boolean false a new order for the columns and each stack on every load; the presenter view gets the same order, and print keeps yours
fragments boolean true steps within slides (clicks); false draws every slide at its last step, and a press goes to the next slide
fragmentInURL boolean true the step is part of the URL
hash boolean true the slide is part of the URL hash
respondToHashChanges boolean true a change to the hash (a link, the address bar) moves the deck
hashOneBasedIndex boolean false count slides from 1 in the hash
history boolean false push a history entry per slide (otherwise the hash is replaced)
previewLinks boolean false open links in an in-deck preview
embedded boolean false the deck lives in part of a page (also ?embedded): it fits its own element, takes keys only while focused and leaves the page’s hash and title alone. See Embed a deck in a page
postMessage boolean true a page that frames the deck can drive it with reveal.js’s { method, args } messages
postMessageEvents boolean false send every deck event to the framing page as { namespace: "reveal", eventName, state }
preloadIframes boolean | null null true loads every frame within viewDistance; false only when its slide shows; null leaves it to each frame’s data-preload
focusBodyOnPageVisibilityChange boolean true when the tab comes back, take focus from an embedded frame or a control so the keys reach the deck
viewDistance number 3 slides kept mounted around the current one
mobileViewDistance number 2 the same, on phones
hideInactiveCursor boolean true hide the cursor when idle
hideCursorTime number (ms) 5000 after how long
wakeLock boolean true keep the screen awake while presenting
Setting Type Default Meaning
autoSlide number (ms) | false 0 milliseconds between automatic steps; 0: only the slides that set their own; false: none at all
autoSlideMethod string "next" the step auto-slide takes: next walks every step, right skips vertical stacks; also down, prev, first, last or a command id
autoSlideStoppable boolean true a press or a key the deck answers stops auto-slide, and the play view shows a pause/play control; false: neither
defaultTiming number | null null seconds per slide for the pacing timer
totalTime number | null null total seconds for the pacing timer
timer "stopwatch" | "countdown" "stopwatch" the presenter’s timer
duration string | number | null null the talk’s length: 30min, 1h30m, 90s, 25:00, or minutes; the countdown runs from it
autoAnimate boolean true allow auto-animate between slides that ask for it
autoAnimateEasing string "ease"
autoAnimateDuration number (s) 1
autoAnimateUnmatched boolean true fade elements that have no partner
autoAnimateStyles string[] reveal’s twelve the CSS properties that morph: opacity, colour, background colour, padding, font size, line height, letter spacing, borders and outlines
autoAnimateMatcher function deck.config.ts only: (from, to) returns the pairs to morph, in place of matching by text and data-id
autoPlayMedia boolean | null null autoplay video and audio on arrival; null leaves it to each element
Setting Type Default Meaning
showNotes boolean | "separate-page" false print notes with the slides: in a box, or on pages of their own
pdfSeparateFragments boolean true a PDF page per click step
pdfMaxPagesPerSlide number 1 pages a slide taller than one may run onto, broken where each page ends
audienceNotes boolean false show every slide’s notes on the audience page
notesAutoRuby record {} words in the notes and their reading, shown as ruby: { 日本語: ni hon go }
Setting Type Default Meaning
live.api string | null "/api" the room server’s base; null makes an offline deck
live.room string | null null the room to join; null uses the deck’s slug. A host may set it when it serves the deck
live.turnstile string | null null a Cloudflare Turnstile site key; viewers pass a check before joining
remote.relay string | null null the wss:// address of a kadal-deck relay, for the phone remote on a static host
reactions boolean true the reaction bar
qa boolean true audience questions
polls boolean true polls and quizzes
drawings.enabled boolean | "dev" true drawing on slides; dev: only under kadal-deck dev
drawings.persist boolean | "files" true true keeps pinned drawings in the browser; "files" writes drawings/<slide>.svg beside the deck and builds them in; false keeps nothing
drawings.presenterOnly boolean false only the presenter may draw
drawings.syncAll boolean true everyone’s drawings reach the room, not only the presenter’s
drawings.perClick boolean false a stroke shows from the click step it was drawn on
Setting Type Default Meaning
katex record {} KaTeX options for every formula, e.g. { macros: { "\\RR": "\\mathbb{R}" } }
mermaid record {} Mermaid configuration for every diagram (theme, themeVariables, look…)
plantUmlServer string "https://www.plantuml.com/plantuml" the server plantuml fences are drawn by
monacoTypes "auto" | "local" | "cdn" | "none" "auto" where {monaco} editors get the types of the packages they import: the deck’s installed ones in a build, else the CDN
monacoPackages string[] | record [] packages the editors know up front, and the versions {monaco-run} imports: ["zod", "lodash-es@4"] or { zod: "^3.23" }
monacoTypesIgnore string[] [] packages never to fetch types for
monacoRunImports string | false "https://esm.sh" where {monaco-run} loads a bare import from: a CDN base, or a template with {name}, {version} and {path}; false makes bare imports an error

lineNumbers and magicMoveDuration are under Look. See Code and Live code on a slide.

The Vite plugin takes the rest: deck({ entry, shiki, twoslash, codeRunners, remarkPlugins, rehypePlugins, preprocess, katex, mermaid, withoutNotes }). Your remark plugins run after GFM and maths, your rehype plugins after highlighting, and preprocess(text, file) rewrites each file before it is cut into slides. The browser compiler (compileDeck in @kadal/deck/runtime) takes the same options.

Setting Type Default Meaning
pwa boolean | record false kadal-deck build makes an installable app that presents offline; an object sets { name, shortName, themeColor, backgroundColor, display }
bundleRemoteAssets boolean false at build, download the remote images, media, fonts and CSS url()s the deck names into the build, so it needs no network (remoteAssets is accepted too)

See Build and host anywhere.

narration rehearses the talk by reading the notes aloud and turning the pages: { enabled, engine, voice, rate, gap, silent, model, dtype }. enabled is "auto" (on when some slide has notes) or false; engine is auto, baked, kokoro, browser or silent; voice is a Kokoro voice (default af_heart); rate runs from 0.5 to 3; gap is the milliseconds between steps; silent says how long a slide without notes stays (estimate, skip or milliseconds); model is the Hugging Face model and dtype its precision. narration: false turns it off. Per slide, say: replaces the notes and narration: false keeps that slide quiet. See Narration.

glossary takes a path ("terms.yaml"), false, or an object: repeat, headings, skip, delay, sync. See Glossary term cards. The runtime reads delay and sync; the rest steer the compiler, which sees only the headmatter, so set those there.

  • slug is the deck’s slug on the host, read from the Vite base; you don’t set it.
  • badge (the free plan’s “Made with Kadal Deck” mark), ads (the frame round the first and last slides) and live.verify are set by the host that serves the deck, through window.__KADAL_DECK__. A host can also switch the deck’s download button off or on there; deck.kadal.cc shows it on paid plans only. A deck you host yourself has none of these.

YAML right after a slide’s ---, closed by another ---, or a yaml code block as the very first thing in a slide. npx kadal-deck info slidepnpm exec kadal-deck info slideyarn kadal-deck info slidebunx kadal-deck info slide prints the same list.

Key Meaning
layout the slide’s layout; the first slide defaults to cover, the rest to default
class CSS classes on the slide (a string or a list)
id, routeAlias a stable name: #/results links to it, and <Link to="results"> finds it (routeAlias is the same thing)
title, level the title and heading level the table of contents, search and the PDF’s bookmarks use (default: the first heading)
hide, disabled, visibility leave the slide out (visibility: hidden); visibility: uncounted keeps it but leaves it out of the slide number, the total and the progress bar
hideInToc leave it out of <Toc> and the PDF’s bookmarks
background a colour, a gradient, an image, a tiled pattern, a video, a page, or a background component. See Backgrounds
backgroundColor, backgroundGradient, backgroundImage, backgroundSize, backgroundPosition, backgroundRepeat, backgroundOpacity the same, one property at a time
backgroundVideo, backgroundVideoLoop, backgroundVideoMuted, backgroundIframe, backgroundInteractive a video or a page behind the slide
transition, transitionSpeed, backgroundTransition override the deck’s transitions for this slide; zoom-in fade-out names each half
colorScheme dark or light: force tokens on this slide (a dark background under a light theme)
clicks the slide’s total steps, when it can’t be counted from its content
clicksStart the step the slide opens at
autoAnimate, autoAnimateId, autoAnimateRestart animate matching elements between consecutive slides; autoAnimateRestart breaks the chain here
autoAnimateDuration, autoAnimateEasing, autoAnimateUnmatched the animation into this slide, over the deck’s settings
autoSlide (autoslide) milliseconds before this slide advances on its own
timing seconds this slide should take, for the pacing timer
state names added while this slide is shown: state-<name> on the slide, <name> and state-<name> on the deck root, and an event of that name
zoom scale the slide’s content (0.8 fits more)
preload false to load the slide only when reached
image the picture for the image, image-left and image-right layouts
url the page for the iframe, iframe-left and iframe-right layouts
poster, posterUrl, posterWait the stand-in picture for an embedded page. See Export
src include another file’s slides here. See MDX slides
dragPos named positions for <Drag> and <DragArrow>. See Components
terms false, or { skip: [...] }, for glossary linking on this slide
say, narration what the narrator reads on this slide, or narration: false to keep it quiet

Send feedback