This skill should be used when asked to create or edit Slidev (sli.dev) presentation slide decks.
Enable creation and editing of high-quality Slidev presentations. Slidev is a web-based presentation framework that uses Markdown with Vue 3 components, providing features like live code editing, syntax highlighting, animations, and export to multiple formats.
Key capabilities:
Requirements: Node.js >= 24.0.0
# Initialize project
pnpm create slidev
# Or with specific entry file
pnpm create slidev my-slides
# Start development server
cd my-slides
pnpm run dev
---
theme: default
title: My Presentation
---
# Welcome
Introduction slide
---
# Second Slide
Content here
---
layout: end
---
# Thank You
Slide separator: Three dashes (---) padded with new lines
Is this a new presentation?
assets/slide-templates.md or assets/example-configurations.mdWhat type of presentation?
seriph theme, simple transitionsmonaco, lineNumbers, use code templatesdrawings, record, presenter modefade transitions, large typographyStart with minimal headmatter, add features as needed:
Step 1 - Minimal (always include):
---
theme: default
title: Presentation Title
---
Step 2 - Add features (based on content):
---
theme: seriph
title: Presentation Title
author: Your Name
mdc: true
lineNumbers: true # For code
monaco: dev # For live code
transition: slide-left
---
Step 3 - Optimize (for specific use case):
twoslash, higher canvasWidth (1200)aspectRatio: 16/9, optimize fontsexport options, set exportFilenameUse appropriate layout for each slide's purpose:
| Slide Purpose | Layout | Example |
|---|---|---|
| Title slide | cover |
Opening slide |
| Section divider | section |
New topic |
| Standard content | default |
Bullet points, text |
| Centred content | center |
Short quotes |
| Two columns | two-cols |
Comparisons |
| Image + text | image-left/right |
Diagrams with explanation |
| Big number/stat | fact |
Key metrics |
| Quote | quote |
Testimonials |
| Final slide | end |
Thank you, Q&A |
Specify layout in per-slide frontmatter:
---
layout: two-cols
---
Reference: references/layouts-reference.md for all 17 layouts with examples
Built-in components for common needs:
Click animations:
<v-clicks>
- Item 1
- Item 2
- Item 3
</v-clicks>
Media embedding:
<Youtube id="dQw4w9WgXcQ" />
<Tweet id="1234567890" />
Navigation:
<Link to="42">Go to slide 42</Link>
<Toc minDepth="1" maxDepth="2" />
Reference: references/components-reference.md for complete component library
Basic code block:
```typescript
const greeting: string = 'Hello, Slidev!'
console.log(greeting)
```
With line highlighting (incremental):
```ts {1|3-4|all}
const step1 = 'First'
// Highlight line 1
const step2 = 'Second'
const step3 = 'Third'
// Then highlight lines 3-4
// Finally highlight all
```
Interactive editor:
```ts {monaco-run}
console.log('Runs in browser!')
```
Best practices:
{maxHeight:'200px'} if longer)lineNumbers: true for code-heavy presentationsProgressive disclosure (most common):
<v-clicks>
- Point 1
- Point 2
- Point 3
</v-clicks>
Element-level control:
<div v-click>Appears on click 1</div>
<div v-click>Appears on click 2</div>
<div v-click="3">Appears on click 3</div>
Motion animations:
<div
v-motion
:initial="{ x: -80, opacity: 0 }"
:enter="{ x: 0, opacity: 1 }"
>
Animated entrance
</div>
Slide transitions:
---
transition: slide-left
---
Options: fade, slide-left, slide-right, slide-up, slide-down, view-transition
Step 1 - Read and understand:
slides.md to understand structureStep 2 - Make targeted changes:
--- separator and new contentslidev.config.tsStep 3 - Test changes:
slidev # Verify in dev server
Add slide after specific slide:
---) after itChange slide layout:
---
layout: two-cols # Change this
---
Add click animations to list:
<v-clicks>
- Existing item 1
- Existing item 2
</v-clicks>
Enable feature globally: Update headmatter:
---
# Add/update these
monaco: dev
lineNumbers: true
---
Split long presentation:
Create pages/section1.md, then in main slides.md:
---
src: ./pages/section1.md
---
Use pre-built templates from assets/slide-templates.md:
Title slide pattern:
---
layout: cover
background: /cover.jpg
class: text-center
---
# Title
## Subtitle
Author · Date
Code demo pattern:
---
layout: two-cols
---
```ts {monaco-run}
// Interactive code
```
::right::
# Explanation
- Point 1
- Point 2
Comparison pattern:
---
layout: two-cols
---
# Before
Old approach
::right::
# After
New approach
Section divider pattern:
---
layout: section
background: linear-gradient(to right, #667eea, #764ba2)
class: text-white
---
# Part 2: Implementation
Complete examples: See assets/example-configurations.md for full presentation templates
# Basic export
slidev export
# With options
slidev export --output presentation.pdf
slidev export --with-clicks # Include animations
slidev export --dark # Dark mode
slidev export --range 1,4-8 # Specific slides
Prerequisites: Install playwright-chromium
pnpm add -D playwright-chromium
slidev export --format pptx # PowerPoint
slidev export --format png # PNG images
slidev export --format md # Markdown with PNGs
slidev build
slidev build --base /slides/ # For subdirectory hosting
Deploy dist/ directory to static hosting (Netlify, Vercel, GitHub Pages).
---
# Theme
theme: seriph # or: default, apple-basic, carbon, dracula, nord, etc.
# Metadata
title: Presentation Title
author: Your Name
info: |
## Description
Multi-line supported
# Features
mdc: true # Enable MDC syntax
monaco: dev # Enable Monaco editor
lineNumbers: true # Line numbers in code
twoslash: true # TypeScript type info
download: true # PDF download button
# Appearance
colorSchema: auto # auto, light, or dark
transition: slide-left # Global transition
# Layout
aspectRatio: 16/9
canvasWidth: 980
# Fonts
fonts:
sans: Inter
mono: JetBrains Mono
weights: '300,400,600,700'
provider: google
# Export
exportFilename: my-presentation
export:
format: pdf
withClicks: false
dark: false
---
Complete reference: See references/configuration-reference.md
---
layout: center # Slide layout
background: /image.jpg # Background image
class: text-white # CSS classes
transition: fade # Override global
clicks: 5 # Number of clicks
hideInToc: true # Hide from TOC
zoom: 0.8 # Scale content
routeAlias: solutions # Navigation alias
---
Slides not updating:
slidev --force # Clear cache
Layout not found:
./layouts/Code not highlighting:
```typescript not ```slidev --forceExport fails or hangs:
pnpm add -D playwright-chromium # Install first
slidev export --timeout 60000 # Increase timeout
slidev export --wait 2000 # Add wait time
Monaco not working:
monaco: 'dev' or monaco: true in headmatterImages not loading:
/ for public folderpublic/ directoryComplete guide: See references/troubleshooting.md
<v-clicks> for lists{1|3-5|all}zoom if needed)preload: false on heavy slides/public foldermonaco: false if not neededThis skill includes comprehensive documentation:
references/assets/User request: "Create a technical presentation about TypeScript best practices"
Step 1: Choose template from assets/example-configurations.md → "Technical/Code-Heavy Presentation"
Step 2: Create slides.md with appropriate headmatter:
---
theme: default
title: TypeScript Best Practices
author: Developer Name
monaco: dev
lineNumbers: true
twoslash: true
---
Step 3: Add slides using templates from assets/slide-templates.md:
Step 4: Start dev server to preview:
slidev
Step 5: Export when ready:
slidev export --format pdf