Slide

abstract class Slide(presentation: Presentation, content: SlideArgs)

Base class for all slide types (MarkdownSlide, HtmlSlide, DslSlide). Holds the shared reveal.js attributes (id, classes, style, visibility flags, auto-animate flags) and a per-slide SlideConfig that is merged with the global / presentation configs at render time.

Instances are not constructed directly — use Presentation.markdownSlide, Presentation.htmlSlide, Presentation.dslSlide, or Presentation.verticalSlides.

Inheritors

Constructors

Link copied to clipboard
constructor(presentation: Presentation, content: SlideArgs)

Properties

Link copied to clipboard

When true, reveal.js auto-animates between this slide and the previous one.

Link copied to clipboard

When true, forces auto-animate to restart from this slide even if the previous used it.

Link copied to clipboard

CSS class list applied to the slide's <section> element.

Link copied to clipboard

Placeholder that intentionally throws when written to — CSS must be declared at the kslides{} or presentation{} level, not on individual slides. Present so invalid usage produces a clear error rather than silently compiling.

Link copied to clipboard

When true, the slide is excluded from navigation and the slide counter.

Link copied to clipboard
var id: String

HTML id applied to the slide's <section>; blank omits the attribute.

Link copied to clipboard
Link copied to clipboard

Inline CSS applied to the slide's <section>; blank omits the attribute.

Link copied to clipboard

When true, the slide is navigable but excluded from the slide counter.

Functions

Link copied to clipboard
fun css(block: CssBuilder.() -> Unit)

Guard against declaring css {} inside a slide — CSS belongs on the kslides{} or presentation{} scope. Always throws IllegalArgumentException.

Link copied to clipboard
fun processSlide(section: SECTION)

Apply this slide's id/style/visibility/auto-animate attributes plus the merged SlideConfig to the given <section> element. Called by the slide renderer and not typically invoked by user code.

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

Configure per-slide reveal.js attributes (transitions, backgrounds, Markdown separators, etc.). Overrides values inherited from the global and presentation slideConfig{} blocks.