Stay Updated!

Get the latest posts and insights delivered directly to your inbox

Skip to content

Presentation Mode: Turn Your Blog Posts into Slides

Updated:Β atΒ 

Try It Now!

Press P on your keyboard or click the floating button in the bottom-right corner to enter presentation mode. Use arrow keys to navigate between slides and reveal content step-by-step!

Presentation Mode

Turn your blog posts into beautiful slides with incremental reveals


Why Presentation Mode?#

The Problem: You write a great blog post, then need to present it at a meetup.

Old Solution: Recreate everything in PowerPoint or Google Slides.

New Solution: Just add presentation: true to your frontmatter!

---
title: "My Awesome Post"
presentation: true
---

Keyboard Shortcuts#

KeyAction
PToggle presentation mode
β†’ or SpaceNext click step, then next slide
←Previous click step, then previous slide
1-9Jump to slide N (resets clicks)
HomeFirst slide
EndLast slide
EscapeExit presentation

V-Click Animations

Reveal content step-by-step with Slidev-style click animations


Sequential Reveals#

Press β†’ to reveal each point:

Step 1: First, we define the problem clearly.

Step 2: Then, we explore possible solutions.

Step 3: Finally, we implement and test!


Building a List#

Benefits of incremental reveals:


V-Click Syntax#

In MDX files, use components to control reveals:

<VClick />
Content appears on click

<VClicks>
- Each list item
- Gets its own click
</VClicks>

<VClick order={3} />
Explicit order (appears third)

<VClick hide />
This disappears on click

Custom Components

Interactive React components work in slides!


Context Window Visualizer#

This is a custom React component rendered inside a slide:

context-window-demo
CONTEXT WINDOW3.1k / 200.0k tokens (1.6%)
Used: 1.6%Remaining: 98.5%
messages: Message[] = [
[0]
System:"System prompt + CLAUDE.md"
3100 tok
[1]← You are here
]
Yesterday's session?
βˆ… Not in the array. Doesn't exist.
❯

Each message you send adds to the array. The context window is just a sliding array of messages.

Try typing messages to see the context fill up!


Code Blocks Work Perfectly#

Here’s a Vue composable example with full syntax highlighting:

import { ref, computed } from 'vue'

export function useCounter(initial = 0) {
  const count = ref(initial)

  const double = computed(() => count.value * 2)

  function increment() {
    count.value++
  }

  return { count, double, increment }
}

Mermaid Diagrams#

Flowcharts render beautifully in slides:

Yes

No

Blog Post

presentation: true?

Show Toggle Button

Normal Post

Press P

Fullscreen Slides!


Slide Layouts


Available Layouts#

This feature supports 9 different layout types:

LayoutDescription
defaultStandard centered prose
coverLarge title, full-bleed
centerFully centered content
two-colsTwo-column split
image-leftImage 40%, content 60%
image-rightContent 60%, image 40%
imageFull-bleed background
quoteProminent blockquote
sectionSection divider

Layout Syntax#

In .md files, use HTML comments. In .mdx files, use components:

{/* MDX format */}
<Slide layout="cover" />
# My Title

---

{/* .md format */}
<!--slide:{"layout":"cover"}-->
# My Title

Layout Properties#

All layouts accept these properties:

PropertyDescription
layoutLayout name (required)
imagePath to image in /public
backgroundSizeCSS value (default: cover)
classCustom CSS class

Layout Animations#

Each layout type has its own animation:

LayoutAnimation
defaultSlide
centerSlide
two-colsSlide
coverFade
imageZoom
quoteFade
sectionFade

Technical Details


Architecture Overview#

Content

Layouts

Frontend

PresentationToggle

PresentationMode

PresentationSlide

PresentationControls

PresentationProgress

SlideLayoutDefault

SlideLayoutCover

SlideLayoutTwoCols

... more layouts

Blog Post

Compiled HTML

Parse slide comments

SlideData Array


Tips for Great Slides#

Content Length#


Accessibility Features#


What’s NOT Included (Yet)#

Future enhancements could include:

Want these features? Open an issue!


Thank You!

Press Escape to exit or continue with arrow keys


Quick Reference#

File format trade-offs:

FormatCustom ComponentsLayoutsV-ClickSyntax
.mdxYesYesYesComponents
.mdNoYesYesHTML comments

Press Escape to exit presentation mode!

Press Esc or click outside to close

Stay Updated!

Subscribe to my newsletter for more TypeScript, Vue, and web dev insights directly in your inbox.

  • Background information about the articles
  • Weekly Summary of all the interesting blog posts that I read
  • Small tips and trick
Subscribe Now