Loading...
Loading...
Use built-in and custom Slidev layouts effectively. Use this skill to structure slides with cover, two-cols, image layouts and more.
npx skill4agent add yoanbernabeu/slidev-skills slidev-layouts---
layout: center
---
# Centered Content---
layout: default
---
# Default Layout
Any content works here:
- Lists
- Code blocks
- Images
- Tables---
layout: center
---
# Big Statement
Perfect for impactful single messages---
layout: cover
background: /images/cover.jpg
---
# Presentation Title
Subtitle or author namebackground---
layout: intro
---
# My Presentation
## A Journey Through Code
<div class="absolute bottom-10">
<span class="font-700">
John Doe
</span>
<br>
<span class="text-sm opacity-50">
Senior Developer @ TechCorp
</span>
</div>---
layout: section
---
# Part 1
Getting Started---
layout: statement
---
# Code is poetry---
layout: quote
---
# "Any fool can write code that a computer can understand. Good programmers write code that humans can understand."
Martin Fowler---
layout: fact
---
# 100%
of developers love Slidev*
<small>*citation needed</small>---
layout: two-cols
---
# Left Column
- Point 1
- Point 2
- Point 3
::right::
# Right Column
```js
const code = 'here'
**Slot**: `::right::` separates columns
### two-cols-header
Two columns with a spanning header.
```markdown
---
layout: two-cols-header
---
# Comparison
::left::
## Option A
- Feature 1
- Feature 2
::right::
## Option B
- Feature X
- Feature Y::left::::right::---
layout: image
image: /images/photo.jpg
backgroundSize: cover
---imagebackgroundSize---
layout: image-left
image: /images/diagram.png
backgroundSize: contain
---
# Explanation
The diagram shows:
- Component A
- Component B
- Their relationship---
layout: image-right
image: /images/screenshot.png
---
# Feature Overview
Our new feature includes:
- Fast performance
- Easy to use
- Beautiful design---
layout: iframe
url: https://sli.dev
---url---
layout: iframe-right
url: https://example.com
---
# Live Demo
Check out the live example on the right---
layout: full
---
<div class="w-full h-full bg-gradient-to-r from-blue-500 to-purple-600">
<h1 class="text-white text-center pt-40">Full Screen</h1>
</div>---
layout: none
---
<div class="custom-everything">
Completely custom content
</div>---
layout: end
---
# Thank You!
Questions?| Layout | Use Case |
|---|---|
| General content |
| Single focused message |
| Opening slide |
| Author introduction |
| Section divider |
| Bold statement |
| Quotations |
| Statistics/numbers |
| Side-by-side content |
| Comparison with header |
| Full background image |
| Image + text |
| Text + image |
| Embedded webpage |
| Edge-to-edge content |
| Closing slide |
layouts/my-layout.vue<template>
<div class="slidev-layout my-layout">
<slot />
</div>
</template>
<style scoped>
.my-layout {
padding: 2rem;
display: flex;
flex-direction: column;
gap: 1rem;
}
</style><!-- layouts/split-header.vue -->
<template>
<div class="slidev-layout split-header">
<header class="header">
<slot name="header" />
</header>
<main class="content">
<div class="left">
<slot name="left" />
</div>
<div class="right">
<slot name="right" />
</div>
</main>
</div>
</template>
<style scoped>
.split-header {
display: grid;
grid-template-rows: auto 1fr;
height: 100%;
}
.header {
padding: 1rem 2rem;
border-bottom: 1px solid #e5e7eb;
}
.content {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 2rem;
padding: 2rem;
}
</style>---
layout: split-header
---
::header::
# Comparison Overview
::left::
## Before
Old approach details
::right::
## After
New approach details<!-- layouts/branded.vue -->
<script setup>
defineProps({
logo: {
type: String,
default: '/logo.png'
},
color: {
type: String,
default: '#3b82f6'
}
})
</script>
<template>
<div class="slidev-layout branded">
<img :src="logo" class="logo" />
<div class="content" :style="{ borderColor: color }">
<slot />
</div>
</div>
</template>---
layout: branded
logo: /company-logo.png
color: '#ef4444'
---
# Branded Contentseriphdefaultcovercentertwo-colssectioncoverimage---
layout: cover
---
# Title
---
layout: intro
---
# About Me
---
layout: section
---
# Part 1
---
layout: default
---
# Content...
---
layout: section
---
# Part 2
---
layout: end
---
# Thank You---
layout: two-cols-header
---
# React vs Vue
::left::
## React
- JSX syntax
- Large ecosystem
- Facebook backing
::right::
## Vue
- Template syntax
- Gentle learning curve
- Community drivenSLIDE STRUCTURE:
1. [layout: cover] - Opening with title
2. [layout: intro] - Speaker introduction
3. [layout: section] - Topic 1 header
4. [layout: default/two-cols] - Content slides
5. [layout: section] - Topic 2 header
6. [layout: image-right] - Demo/screenshot
7. [layout: fact] - Key statistic
8. [layout: end] - Closing
LAYOUT RECOMMENDATION:
- For this content type, use [layout]
- Reason: [explanation]
EXAMPLE:
---
layout: [recommended]
[additional options if needed]
---
[Content structure]