.agents/skills/slidev-transitions/SKILL.md
Add smooth slide transitions in Slidev. Use this skill for fade, slide, and custom transitions between slides.
npx skillsauth add szeyu/open-ssyok-finance slidev-transitionsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill covers adding smooth transitions between slides in Slidev, including built-in transitions, custom animations, and directional transitions.
---
transition: slide-left
---
Applied to all slides in the presentation.
---
transition: fade
---
# This slide fades in
---
transition: slide-up
---
# This slide slides up
# Slide 1
---
transition: zoom
---
# Slide 2 (zooms in)
| Name | Effect |
|------|--------|
| fade | Simple fade in/out |
| fade-out | Fade out, then appear |
---
transition: fade
---
| Name | Effect |
|------|--------|
| slide-left | New slide enters from right |
| slide-right | New slide enters from left |
| slide-up | New slide enters from bottom |
| slide-down | New slide enters from top |
---
transition: slide-left
---
Uses the modern View Transitions API:
---
transition: view-transition
---
Note: Requires browser support for View Transitions API.
Use | to separate forward and backward transitions:
---
transition: slide-left | slide-right
---
# Natural slide direction
---
transition: slide-left | slide-right
---
# Vertical navigation
---
transition: slide-up | slide-down
---
# Fade forward, slide back
---
transition: fade | slide-right
---
Create styles/index.css:
/* Define custom transition */
.my-transition-enter-active,
.my-transition-leave-active {
transition: all 0.5s ease;
}
.my-transition-enter-from {
opacity: 0;
transform: translateX(100px) rotate(10deg);
}
.my-transition-leave-to {
opacity: 0;
transform: translateX(-100px) rotate(-10deg);
}
Use in frontmatter:
---
transition: my-transition
---
Slidev uses Vue transition classes:
| Class | When Applied |
|-------|--------------|
| [name]-enter-from | Starting state for enter |
| [name]-enter-active | During enter transition |
| [name]-enter-to | Ending state for enter |
| [name]-leave-from | Starting state for leave |
| [name]-leave-active | During leave transition |
| [name]-leave-to | Ending state for leave |
.scale-enter-active,
.scale-leave-active {
transition: all 0.4s ease;
}
.scale-enter-from {
opacity: 0;
transform: scale(0.8);
}
.scale-leave-to {
opacity: 0;
transform: scale(1.2);
}
.flip-enter-active,
.flip-leave-active {
transition: all 0.6s ease;
transform-style: preserve-3d;
}
.flip-enter-from {
opacity: 0;
transform: rotateY(-90deg);
}
.flip-leave-to {
opacity: 0;
transform: rotateY(90deg);
}
.blur-enter-active,
.blur-leave-active {
transition: all 0.5s ease;
}
.blur-enter-from {
opacity: 0;
filter: blur(20px);
}
.blur-leave-to {
opacity: 0;
filter: blur(20px);
}
.bounce-enter-active {
animation: bounce-in 0.5s;
}
.bounce-leave-active {
animation: bounce-out 0.5s;
}
@keyframes bounce-in {
0% {
opacity: 0;
transform: scale(0.3);
}
50% {
transform: scale(1.1);
}
100% {
opacity: 1;
transform: scale(1);
}
}
@keyframes bounce-out {
0% {
opacity: 1;
transform: scale(1);
}
100% {
opacity: 0;
transform: scale(0.3);
}
}
.swipe-enter-active,
.swipe-leave-active {
transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.swipe-enter-from {
opacity: 0;
transform: translateX(100%);
}
.swipe-leave-to {
opacity: 0;
transform: translateX(-100%);
}
---
transition: view-transition
---
<div style="view-transition-name: hero">
Content that transitions smoothly
</div>
Elements with the same view-transition-name on consecutive slides will animate between their positions.
---
transition: view-transition
---
<div style="view-transition-name: card" class="w-32 h-32 bg-blue-500">
Small card
</div>
---
transition: view-transition
---
<div style="view-transition-name: card" class="w-64 h-64 bg-blue-500">
Card grows!
</div>
.slow-fade-enter-active,
.slow-fade-leave-active {
transition: all 1s ease; /* 1 second */
}
/* Common easing functions */
.ease-in { transition-timing-function: ease-in; }
.ease-out { transition-timing-function: ease-out; }
.ease-in-out { transition-timing-function: ease-in-out; }
.linear { transition-timing-function: linear; }
/* Cubic bezier for custom easing */
.custom { transition-timing-function: cubic-bezier(0.68, -0.55, 0.265, 1.55); }
.delayed-enter-active {
transition: all 0.5s ease 0.2s; /* 0.2s delay */
}
---
layout: cover
transition: fade
---
# Title Slide
---
layout: default
transition: slide-left
---
# Content Slide
---
layout: section
transition: zoom
---
# Section Break
---
layout: end
transition: fade
---
# Thank You
---
transition: none
---
---
transition: false
---
Use the same transition family throughout:
# Good: Consistent slide family
---
transition: slide-left | slide-right
---
| Content | Suggested Transition |
|---------|---------------------|
| Cover/Title | fade |
| Regular content | slide-left |
| Section break | fade or zoom |
| Demo/Code | fade |
| Conclusion | fade |
❌ Too flashy
.crazy-enter-active {
animation: spin 2s, bounce 1s, flash 0.5s;
}
✓ Professional
.subtle-enter-active {
transition: opacity 0.3s ease;
}
Complex transitions may lag on:
/* styles/transitions.css */
/* Gentle fade */
.pro-fade-enter-active,
.pro-fade-leave-active {
transition: opacity 0.3s ease;
}
.pro-fade-enter-from,
.pro-fade-leave-to {
opacity: 0;
}
/* Smooth slide */
.pro-slide-enter-active,
.pro-slide-leave-active {
transition: all 0.35s ease-out;
}
.pro-slide-enter-from {
opacity: 0;
transform: translateX(30px);
}
.pro-slide-leave-to {
opacity: 0;
transform: translateX(-30px);
}
/* Energetic bounce */
.playful-enter-active {
animation: pop-in 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}
@keyframes pop-in {
0% { transform: scale(0); opacity: 0; }
80% { transform: scale(1.1); }
100% { transform: scale(1); opacity: 1; }
}
When configuring transitions:
---
# GLOBAL TRANSITION (first slide)
transition: [transition-name] | [backward-transition]
---
# Slide content...
---
# PER-SLIDE OVERRIDE (if needed)
transition: [different-transition]
---
# Different slide content...
TRANSITION PLAN:
CUSTOM CSS (if needed):
.[name]-enter-active { ... }
.[name]-leave-to { ... }
documentation
Create organized, visual study notes with folder structures, diagrams, and example-based learning from source materials (PDFs, lecture notes, documentation). Use when creating structured learning materials, exam preparation notes, or educational documentation. Triggers - organize study notes, create visual learning materials, generate notes with diagrams, exam prep notes, example-based learning.
development
Create and present web-based slides for developers using Markdown, Vue components, code highlighting, animations, and interactive features. Use when building technical presentations, conference talks, or teaching materials.
development
Use and customize Slidev themes. Use this skill to apply themes, configure theme options, and create custom themes.
development
Master Slidev's extended Markdown syntax. Use this skill to write slides with advanced formatting, frontmatter, and special features.