Skip to content

Slides

kslides supports three slide types. They share the same configuration surface — pick whichever fits the content.

Type Best for DSL block
Markdown Prose, bullets, light formatting markdownSlide
HTML Fine-grained markup, embedded media htmlSlide
Kotlin HTML DSL Generated content, type-safe markup dslSlide

You can also nest any of them inside a verticalSlides { } block to make a vertical stack.

At a glance

fun markdownBasic() {
  kslides {
    presentation {
      markdownSlide {
        content {
          """
          # Markdown slide
          Use a triple-quoted string.
          """
        }
      }
    }
  }
}
fun htmlBasic() {
  kslides {
    presentation {
      htmlSlide {
        content {
          """
          <h1>Raw HTML</h1>
          <p>Anything reveal.js accepts as slide markup.</p>
          """
        }
      }
    }
  }
}
fun dslBasic() {
  kslides {
    presentation {
      dslSlide {
        content {
          h1 { +"Kotlin HTML DSL" }
          p { +"Build slides with kotlinx.html." }
        }
      }
    }
  }
}

Pick a flavor