Skip to content

Configuration

Options are layered: the engine’s defaults, then the deck’s headmatter, then deck.config.ts (typed as DeckConfigInput — every option is optional, and the nested groups live, drawings, seoMeta and glossary merge one level deep). The names are reveal.js’s and Slidev’s wherever the idea is the same.

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

Slidev’s aspectRatio + canvasWidth spelling is understood too: they set width and height.

Option Type Default Meaning
title string "Untitled deck" the deck’s title (page title, share cards)
author string "" shown where the theme shows it
info string "" a one-line description
seoMeta record {} extra <meta> tags, name → content
fonts string[] [] Google Fonts families to load, e.g. "Inter:wght@400;600"
Option Type Default Meaning
width, height number 1920, 1080 the authored size; the stage scales uniformly to any viewport
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 true vertically centre each slide’s content
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
Option Type Default Meaning
theme string "minimal" the starting theme
themes string[] ["minimal", "rla", "stack"] the themes the theme menu offers (their CSS must be imported)
colorScheme "auto" | "light" | "dark" "auto" the starting scheme
transition none · fade · slide · convex · concave · zoom · view-transition "slide" between slides
transitionSpeed "default" | "fast" | "slow" "default"
backgroundTransition as transition "fade" between slide backgrounds
lineNumbers boolean false line numbers on every code block
magicMoveDuration number (ms) 800 magic-move animation length
selectable boolean true slide text can be selected
Option Type Default Meaning
controls boolean | "speaker" true the arrow controls
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
showSlideNumber "all" | "print" | "speaker" "all" where the number appears
keyboard boolean true keyboard navigation
touch boolean true swipe navigation
mouseWheel boolean false wheel navigation
overview boolean true the overview (O)
jumpToSlide boolean true : to jump
search boolean true / to search
zoom boolean true Z to zoom
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
shuffle boolean false random slide order
fragments boolean true steps within slides (clicks)
fragmentInURL boolean true the step is part of the URL
hash boolean true the slide is part of the URL hash
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 is embedded in a page rather than full-window
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
Option Type Default Meaning
autoSlide number (ms) 0 milliseconds between automatic steps; 0 disables
autoSlideStoppable boolean true a key press stops auto-slide
defaultTiming number | null null seconds per slide for the pacing timer
totalTime number | null null total seconds for the pacing timer
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
autoPlayMedia boolean | null null autoplay video and audio on arrival
Option Type Default Meaning
showNotes boolean | "separate-page" false print notes with the slides
pdfSeparateFragments boolean true a PDF page per step
pdfMaxPagesPerSlide number 1
audienceNotes boolean false show every slide’s notes on the audience page
Option 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
reactions boolean true the reaction bar
qa boolean true audience questions
polls boolean true polls and quizzes
drawings.enabled boolean true drawing on slides
drawings.persist boolean true keep the presenter’s drawings in the browser
drawings.presenterOnly boolean false only the presenter may draw
drawings.syncAll boolean true drawings reach every screen in the room

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.