返回 slidev
layout.md
根目录 / docs / guide / layout.md
1 # Slide Layout
2
3 Layouts in Slidev are used to define the structure for each slide. They are Vue components that wrap the content of the slides.
4
5 ## Using Layouts {#use}
6
7 To use a layout, you can specify it in the frontmatter of the slide:
8
9 ```md
10 ---
11 layout: quote
12 ---
13
14 A quote from someone
15 ```
16
17 By default, the layout of the first slide is `cover`, and the rest are `default`.
18
19 The layouts are loaded in the following order, and the last one loaded will override the previous ones:
20
21 1. default layouts. See [Built-in Layouts](../builtin/layouts).
22 2. layouts provided by the theme
23 3. layouts provided by the addons
24 4. custom layouts in the `layouts` directory
25
26 <SeeAlso :links="[
27 'features/slot-sugar',
28 ]" />
29
30 ## Writing Layouts {#write}
31
32 <LinkCard link="guide/write-layout" />
33
33 lines MARKDOWN