Uses Markdown and Vue components to create presentations with support for PDF, PNG, or PPTX exports.
Install
mkdir -p .claude/skills/slidev && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/120" && unzip -o skill.zip -d .claude/skills/slidev && rm skill.zipInstalls to .claude/skills/slidev
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Comprehensive guide for Slidev - a web-based presentation framework for developers. Covers Markdown syntax, layouts, components, animations, theming, and exporting. Use this skill when creating or working with developer presentations using Slidev.Key capabilities
- →Create presentations using Markdown syntax
- →Embed interactive Vue components and custom code
- →Apply built-in or custom slide layouts and themes
- →Export presentations to PDF, PPTX, or PNG formats
- →Implement click-based animations and motion transitions
- →Integrate syntax-highlighted code blocks with Shiki
How it works
Slidev processes Markdown files into a web-based presentation using Vite and Vue 3. It dynamically renders components and styles defined in the frontmatter or local directories.
Inputs & outputs
When to use slidev
- →Creating a new technical presentation
- →Adding interactive code blocks to slides
- →Exporting slides to PDF for distribution
- →Customizing presentation themes and layouts
About this skill
Slidev
Overview
Slidev is a presentation platform for developers that enables creating slides using Markdown while leveraging Vue and web technologies for interactive, pixel-perfect designs. This skill provides complete guidance for creating, customizing, and exporting Slidev presentations.
Use this skill when:
- Creating new developer presentations
- Working with Markdown-based slides
- Adding interactive components and animations
- Customizing slide layouts and themes
- Integrating code blocks with syntax highlighting
- Exporting presentations to PDF, PPTX, or PNG
- Setting up Slidev projects
Quick Start
Installation and Setup
Create a new Slidev presentation:
# Using pnpm (recommended)
pnpm create slidev
# Using npm
npm init slidev
# Using yarn
yarn create slidev
# Using bun
bun create slidev
Or try online at https://sli.dev/new (StackBlitz)
Essential Commands
Start development server:
slidev
# or specify entry file
slidev slides.md
Build for production:
slidev build
Export to PDF:
slidev export
Export to other formats:
slidev export --format pptx
slidev export --format png
slidev export --format md
Format slides:
slidev format
Markdown Syntax
Slide Separators
Separate slides with --- padded by blank lines:
# Slide 1
Content here
---
# Slide 2
More content
Frontmatter and Headmatter
Configure entire deck with headmatter (first YAML block):
---
theme: default
background: https://cover.sli.dev
title: My Presentation
info: |
## Slidev Starter
Presentation slides for developers
class: text-center
highlighter: shiki
---
Configure individual slides with frontmatter:
---
layout: center
background: ./images/bg.jpg
class: text-white
---
# Centered Slide
Content here
Code Blocks
Code with syntax highlighting:
```ts
console.log('Hello, World!')
```
With line numbers:
```ts {lines:true}
function greet(name: string) {
console.log(`Hello, ${name}!`)
}
```
With line highlighting:
```ts {2,4-6}
function calculate() {
const x = 10 // highlighted
const y = 20
const sum = x + y // highlighted
const product = x * y // highlighted
const difference = x - y // highlighted
return sum
}
```
Presenter Notes
Add notes at the end of slides using comment blocks:
# Slide Title
Content visible to audience
<!--
Notes for presenter only
Can include **markdown** and HTML
-->
Layouts
Using Layouts
Specify layout in frontmatter:
---
layout: cover
---
# Presentation Title
Built-in Layouts
Basic Layouts:
default- Standard layout for any contentcenter- Centers content on screencover- Opening slide for presentationsend- Closing slidenone- Unstyled layout
Content Layouts:
intro- Introduction with title and author detailssection- Marks new presentation sectionsquote- Displays quotations with emphasisfact- Highlights data or facts prominentlystatement- Features affirmations as main contentfull- Utilizes entire screen space
Image Layouts:
image- Full-screen image displayimage-left- Image on left, content on rightimage-right- Image on right, content on left
Iframe Layouts:
iframe- Full-screen web page embeddingiframe-left- Web page on left sideiframe-right- Web page on right side
Multi-Column Layouts:
two-cols- Two-column content separationtwo-cols-header- Header spanning both columns with left/right split
Two-Column Layout Example
---
layout: two-cols
---
# Left Column
Content for left side
::right::
# Right Column
Content for right side
Two-Column with Header
---
layout: two-cols-header
---
# Header Across Both Columns
::left::
Left column content
::right::
Right column content
Components
Built-in Components
Navigation:
<Link>- Navigate between slides<Arrow>- Directional lines with customization<VDragArrow>- Draggable arrows
Text:
<AutoFitText>- Auto-sizing text to fit container<TitleRenderer>- Display parsed slide titles<Toc>- Table of contents generation
Media:
<Youtube>- Embed YouTube videos<Tweet>- Embed Twitter posts<SlidevVideo>- HTML5 video with autoplay
Utilities:
<SlideCurrentNo>- Current slide number<SlidesTotal>- Total slide count<Transform>- Scaling and transformation<LightOrDark>- Theme-based content rendering<RenderWhen>- Conditional rendering by context<VSwitch>- Cycle between content on click<VDrag>- Draggable functionality
Component Usage Examples
<Youtube id="dQw4w9WgXcQ" />
<Tweet id="1234567890" />
<Arrow x1="100" y1="100" x2="200" y2="200" />
<AutoFitText :max="300" :min="20">
This text will auto-size
</AutoFitText>
<Toc minDepth="1" maxDepth="2" />
Custom Components
Create custom Vue components in ./components/ directory. They are auto-imported without manual registration.
Example structure:
./components/
MyComponent.vue
Counter.vue
slides.md
Use in slides:
<MyComponent />
<Counter :initial="10" />
Animations
Click Animations
v-click Directive:
<div v-click>Appears on click</div>
<div v-click>Appears on next click</div>
v-after Directive:
<div v-click>First</div>
<div v-after>Appears with previous</div>
v-clicks for Lists:
<v-clicks>
- First item
- Second item
- Third item
</v-clicks>
Animation Positioning
Absolute positioning:
<div v-click="1">Shows at step 1</div>
<div v-click="2">Shows at step 2</div>
<div v-click="3">Shows at step 3</div>
Relative positioning:
<div v-click>First</div>
<div v-click="+2">Skip one step</div>
<div v-click="-1">Same time as previous</div>
Motion Animations
Use @vueuse/motion for directional animations:
<div
v-motion
:initial="{ x: -80 }"
:enter="{ x: 0 }">
Slides in from left
</div>
Slide Transitions
Configure in frontmatter:
---
transition: slide-left
---
Available transitions:
fadeslide-leftslide-rightslide-upslide-downview-transition
Styling
UnoCSS Integration
Slidev uses UnoCSS with Tailwind-compatible utilities:
<div class="grid grid-cols-2 gap-4">
<div class="bg-blue-500 p-4">Column 1</div>
<div class="bg-red-500 p-4">Column 2</div>
</div>
Custom Styles
Create ./styles/index.css:
.my-custom-class {
@apply text-2xl font-bold text-blue-500;
}
Slide-Scoped Styles
Add styles to specific slides:
# Slide Title
Content here
<style>
h1 {
color: #3b82f6;
}
</style>
Dark Mode Support
UnoCSS dark mode utilities:
<div class="bg-white dark:bg-black text-black dark:text-white">
Adapts to theme
</div>
Exporting
Browser Export (Recommended)
- Start dev server:
slidev - Click "Export" button in navigation bar
- Or visit
http://localhost:3030/export - Choose format and download
CLI Export
Install Playwright first:
pnpm add -D playwright-chromium
Export to PDF:
slidev export
# or specify output
slidev export --output my-presentation.pdf
Export to PPTX:
slidev export --format pptx
Export to PNG:
slidev export --format png
Export with animations:
slidev export --with-clicks
Export specific slides:
slidev export --range 1,6-8,10
Export in dark mode:
slidev export --dark
Export Options
--output- Custom filename--format- Export format (pdf, pptx, png, md)--with-clicks- Include animation steps--range- Specific slides (e.g., 1,6-8,10)--dark- Use dark theme--timeout- Increase timeout for large presentations--wait- Add delay before export--with-toc- Generate PDF outline
Configuration
Directory Structure
./
├─ components/ # Custom Vue components
├─ layouts/ # Custom layouts
├─ public/ # Static assets
├─ setup/ # Custom setup code
├─ snippets/ # Code snippets
├─ styles/ # Custom styles
├─ slides.md # Main presentation file
├─ vite.config.ts # Vite configuration
└─ uno.config.ts # UnoCSS configuration
UnoCSS Configuration
Create uno.config.ts:
import { defineConfig } from 'unocss'
export default defineConfig({
shortcuts: {
'bg-main': 'bg-white text-[#181818] dark:(bg-[#121212] text-[#ddd])'
}
})
Vite Configuration
Extend Vite config in vite.config.ts:
import { defineConfig } from 'vite'
export default defineConfig({
// Your custom Vite config
})
Features
Code Features
Line Numbers:
```ts {lines:true}
function example() {
return true
}
```
Line Highlighting:
```ts {2-4}
function calculate() {
const x = 10 // highlighted
const y = 20 // highlighted
const sum = x + y // highlighted
return sum
}
```
Monaco Editor:
```ts {monaco}
// Editable code block
console.log('Edit me!')
```
Monaco with Auto-Run:
```ts {monaco-run}
console.log('Runs automatically')
```
Diagrams
Mermaid:
```mermaid
graph TD
A[Start] --> B[Process]
B --> C[End]
```
PlantUML:
```plantuml
@startuml
Alice -> Bob: Hello
Bob -> Alice: Hi
@enduml
```
LaTeX
Inline math:
Pythagorean theorem: $a^2 + b^2 = c^2$
Block math:
$$
\int_0^\infty e^{-x^2} dx = \frac{\sqrt{\pi}}{2}
$$
Icons
Use Iconify icons directly:
<carbon-logo-github /> GitHub
<mdi-heart class="text-red-500" /> Love
Drawing
Enable drawing on slides with presenter mode. Drawings are synchroniz
Content truncated.
When not to use it
- →Creating non-web-based or static document formats without browser rendering
- →Projects requiring non-Vue component architectures
Prerequisites
Limitations
- →Exporting complex animations requires specific CLI flags
- →Large presentations may require increased export timeouts
- →System font availability can affect PDF rendering
How it compares
Unlike traditional static slide software, Slidev treats presentations as web applications, allowing for live code execution, interactive components, and programmatic layout control.
Compared to similar skills
slidev side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| slidev (this skill) | 371 | 9mo | Review | Intermediate |
| vitepress | 0 | 5mo | No flags | Intermediate |
| marp-slide | 4 | 6mo | No flags | Beginner |
| create-section | 0 | 7mo | No flags | Beginner |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by XIYO
View all by XIYO →You might also like
vitepress
hsc00
---------- | -------------------------------------------------- | -------------------------------------------- | | Configuration | Config file setup, defineConfig, site metadata | [core-config](references/core-config.md) | | CLI | Command-line interface: dev, build, preview, init
marp-slide
davila7
Create professional Marp presentation slides with 7 beautiful themes (default, minimal, colorful, dark, gradient, tech, business). Use when users request slide creation, presentations, or Marp documents. Supports custom themes, image layouts, and "make it look good" requests with automatic quality improvements.
create-section
JanDeDobbeleer
Use when creating a new section for the AI Workshop presentation. Guides through title slide setup, layout choices, and content gathering. Activates when user wants to add a new topic section to the slideshow.
slides
sapsapshen
|
paper-2-web
bg-szy
This skill should be used when converting academic papers into promotional and presentation formats including interactive websites (Paper2Web), presentation videos (Paper2Video), and conference posters (Paper2Poster). Use this skill for tasks involving paper dissemination, conference preparation, cr
baoyu-slide-deck
sayanget
Generate professional slide deck images from content. Creates comprehensive outlines with style instructions, then generates individual slide images. Use when user asks to "create slides", "make a presentation", "generate deck", or "slide deck".