PresentationConfig

Presentation-level configuration — mirrors the reveal.js config options plus kslides-specific settings for theme, corner links, Google Analytics, and nested sub-configs (menuConfig, copyCodeConfig, slideConfig, playgroundConfig, letsPlotIframeConfig, diagramConfig).

Configured at three levels that merge in order: global → presentation → slide. The global instance is seeded with kslides defaults via assignDefaults; subsequent presentation- and slide-level instances only carry overrides and are merged on top.

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard

Globally disable auto-animate transitions. Individual slides can still opt in via data-auto-animate.

Link copied to clipboard

Default duration (seconds) for auto-animate transitions.

Link copied to clipboard

Default CSS easing function for auto-animate transitions.

Link copied to clipboard

Optional custom element matcher used to decide which elements animate between slides.

Link copied to clipboard

CSS properties auto-animate can transition. Position and scale are handled separately, so top/left/width/height/margin are not needed here.

Link copied to clipboard

When true, elements not matched by auto-animate fade in/out.

Link copied to clipboard

Global override for autoplay on embedded media.

Link copied to clipboard

Auto-slide behavior.

Link copied to clipboard

When true, user input halts auto-sliding until the next manual navigation.

Link copied to clipboard

Default transition style for full-page slide backgrounds.

Link copied to clipboard

Vertically center slide content.

Link copied to clipboard

Display the arrow controls for navigation.

Link copied to clipboard

Visibility of the backwards-navigation arrows. "faded", "hidden", or "visible".

Link copied to clipboard

Position of the navigation arrows. "edges" or "bottom-right".

Link copied to clipboard

Help the user learn the controls with hints (e.g. bouncing the down arrow the first time a vertical stack is encountered).

Link copied to clipboard

Typical time in seconds spent on each slide. Drives the pacing timer in the speaker view; has no effect on actual navigation.

Link copied to clipboard

Disable reveal.js's default scaling and centering so that a custom CSS layout can take over.

Link copied to clipboard

CSS display value used when showing slides.

Link copied to clipboard

Flag the presentation as running in an embedded (non-full-window) context.

Link copied to clipboard

Load the CopyCode plugin (adds a copy button to code blocks). See CopyCodeConfig.

Link copied to clipboard

Load the reveal.js highlight.js plugin for syntax-highlighted code blocks.

Link copied to clipboard

Load the reveal.js Markdown plugin (required for com.kslides.slide.MarkdownSlide).

Link copied to clipboard

Load the math plugin with MathJax 2 support.

Link copied to clipboard

Load the math plugin with MathJax 3 support.

Link copied to clipboard

Load the math plugin with KaTeX support.

Link copied to clipboard

Load the reveal.js-menu plugin. See MenuConfig.

Link copied to clipboard

Load the reveal.js search plugin (keyboard: ctrl+shift+f).

Link copied to clipboard

Load the reveal.js speaker-notes plugin.

Link copied to clipboard

Load the reveal.js zoom plugin (keyboard: alt+click).

Link copied to clipboard

When true, focus the document body on visibility changes so keyboard shortcuts work.

Link copied to clipboard

Include the current fragment index in the URL so reloads land on the same fragment.

Link copied to clipboard

Globally enable/disable fragments.

Link copied to clipboard

Google Analytics property id. When non-blank, injects the gtag.js loader and config.

Link copied to clipboard

When true, the current slide is appended to the URL hash so reloading the page or copying the URL returns the viewer to the same slide.

Link copied to clipboard

When true, # URL links use 1-based indexing to match the slide number.

Link copied to clipboard
var height: Any

"Normal" presentation height. Same notes as width. reveal.js default: 700.

Link copied to clipboard

Show a help overlay when the question-mark key is pressed.

Link copied to clipboard

Milliseconds of inactivity before the cursor is hidden (requires hideInactiveCursor).

Link copied to clipboard

Hide the mouse cursor when it is inactive.

Link copied to clipboard

Code-highlighting theme (requires enableHighlight).

Link copied to clipboard

Push every slide change into browser history. Implies hash = true.

Link copied to clipboard

Jump-to-slide UI (reveal.js 4.5+). Allows typing a slide number to jump directly.

Link copied to clipboard

Enable keyboard shortcuts for navigation.

Link copied to clipboard

Optional keyboard-event gate. If set to "focused", embedded decks only receive keyboard events when they have focus.

Link copied to clipboard

Values consumed by kslides itself (theme, highlight plugin, corner links, iframe sizing, etc.).

Link copied to clipboard

Loop the presentation back to the first slide after the last.

Link copied to clipboard

Fraction of the display size left empty around the content. reveal.js default: 0.04.

Link copied to clipboard

Upper bound on the scale factor applied to fit content in the viewport.

Link copied to clipboard

Lower bound on the scale factor applied to fit content in the viewport.

Link copied to clipboard

Like viewDistance but for mobile devices; typically lower to conserve resources.

Link copied to clipboard

Enable slide navigation via the mouse wheel.

Link copied to clipboard

Navigation mode. One of:

Link copied to clipboard

Enable the slide overview (keyboard: o or esc).

Link copied to clipboard

Allow pausing the presentation (blackout) with the b / . keys.

Link copied to clipboard

Maximum number of pages a single slide can span when printing to PDF (unlimited by default).

Link copied to clipboard

Pixel offset subtracted from each exported PDF page's content height to avoid clipping in specific PDF renderers (CLI tools like phantomjs and wkpdf tend to render one pixel differently from in-browser printing).

Link copied to clipboard

When true, each fragment is printed on a separate PDF page.

Link copied to clipboard

Expose the reveal.js API via window.postMessage.

Link copied to clipboard

Dispatch every reveal.js event to the parent window via postMessage.

Link copied to clipboard

Global override for iframe lazy loading.

Link copied to clipboard

When true, links open in an iframe preview overlay. Individual links can opt out with data-preview-link="false".

Link copied to clipboard

Display the presentation progress bar.

Link copied to clipboard

When true, reveal.js watches the URL hash and navigates on changes.

Link copied to clipboard

Values that correspond to documented reveal.js config options.

Link copied to clipboard

Right-to-left presentation direction.

Link copied to clipboard

Minimum viewport width in pixels before switching to scroll view.

Link copied to clipboard

Scroll-view layout (reveal.js 5.0+).

Link copied to clipboard

Scroll-progress indicator in scroll view.

Link copied to clipboard

Scroll-snap behavior (reveal.js 5.0+).

Link copied to clipboard

When true, speaker notes are rendered inline for all viewers instead of in the speaker view.

Link copied to clipboard

Context in which the slide number is displayed. "all", "print" (PDF only), or "speaker" (speaker view only).

Link copied to clipboard

Randomize slide order on each page load.

Link copied to clipboard

Slide-number display.

Link copied to clipboard

reveal.js theme.

Link copied to clipboard

Browser tab title. Blank omits the <title> element.

Link copied to clipboard

URL for the top-left corner link. Blank hides the corner element.

Link copied to clipboard

Inline SVG rendered inside the top-left corner link. Mutually useful with topLeftSvgSrc.

Link copied to clipboard

CSS class on the top-left corner <img>/SVG.

Link copied to clipboard

URL of an image to display in the top-left corner link (alternative to topLeftSvg).

Link copied to clipboard

Inline CSS on the top-left corner <img>/SVG.

Link copied to clipboard

<a target> value for the top-left corner link.

Link copied to clipboard

Text rendered inside the top-left corner link (after any SVG).

Link copied to clipboard

Tooltip / screen-reader title for the top-left corner link.

Link copied to clipboard

URL for the top-right corner link. Blank hides the corner element.

Link copied to clipboard

Inline SVG rendered inside the top-right corner link.

Link copied to clipboard

CSS class on the top-right corner <img>/SVG.

Link copied to clipboard

URL of an image for the top-right corner link.

Link copied to clipboard

Inline CSS on the top-right corner <img>/SVG.

Link copied to clipboard

<a target> value for the top-right corner link.

Link copied to clipboard

Text rendered inside the top-right corner link (after any SVG).

Link copied to clipboard

Tooltip / screen-reader title for the top-right corner link.

Link copied to clipboard

Enable touch navigation on touch-capable devices.

Link copied to clipboard

Default slide-transition style (see Transition).

Link copied to clipboard

Default slide-transition speed (see Speed).

Link copied to clipboard

Presentation view mode (reveal.js 5.0+): classic deck vs scrolling document.

Link copied to clipboard

Number of slides in each direction that remain in the DOM for smooth transitions.

Link copied to clipboard
var width: Any

"Normal" presentation width. Aspect ratio is preserved when scaling to the viewport. May be an integer (pixels) or a percentage string. reveal.js default: 960.

Functions

Link copied to clipboard

Configure the CopyCode plugin. Only takes effect when enableCodeCopy is true.

Link copied to clipboard
fun diagramConfig(block: DiagramConfig.() -> Unit)

Configure defaults for com.kslides.diagram Kroki images.

Link copied to clipboard

Configure defaults for letsPlot{} iframes (from the kslides-letsplot module).

Link copied to clipboard
fun menuConfig(block: MenuConfig.() -> Unit)

Configure the reveal.js-menu plugin. Only takes effect when enableMenu is true.

Link copied to clipboard
fun merge(other: AbstractConfig)

Copy all entries from other's maps into this config's maps. Later puts overwrite earlier ones.

Link copied to clipboard

Configure defaults for com.kslides.playground iframes.

Link copied to clipboard
fun slideConfig(block: SlideConfig.() -> Unit)

Configure the default SlideConfig values applied to every slide in the scope.