Built-in Components

The documentations of this section is still working in progress. Before that, you can take a look at the source code directly.


Insert a Table Of Content.

If you want a slide to not appear in the <Toc> component, you can use in the front matter block of the slide:

hideInToc: true

Titles are displayed using the <Titles> component


<Toc />


  • columns (string | number, default: 1): The number of columns of the display
  • listClass (string | string[], default: ''): Classes to apply to the table of contents list
  • maxDepth (string | number, default: Infinity): The maximum depth level of title to display
  • minDepth (string | number, default: 1): The minimum depth level of title to display
  • mode ('all' | 'onlyCurrentTree'| 'onlySiblings', default: 'all'):
    • 'all': Display all items
    • 'onlyCurrentTree': Display only items that are in current tree (active item, parents and children of active item)
    • 'onlySiblings': Display only items that are in current tree and their direct siblings

Insert a link you can use to navigate to a given slide.


<Link to="42">Go to slide 42</Link>
<Link to="42" title="Go to slide 42"/>


  • to (string | number): The path of the slide to navigate to (slides starts from 1)
  • title (string): The title to display


Insert the main title from a slide parsed as HTML.

Titles and title levels get automatically retrieved from the first title element of each slides.

You can override this automatic behaviour for a slide by using the front matter syntax:

title: Amazing slide title
level: 2


The <Titles> component is a virtual component you can import with:

import Titles from '/@slidev/'

Then you can use it with:

<Titles no="42" />


  • no (string | number): The number of the slide to display the title from (slides starts from 1)


Use it to display one thing or another depending on the active light or dark theme.


Use it with the two named Slots #dark and #light:

  <template #dark>Dark mode is on</template>
  <template #light>Light mode is on</template>

Provided props on LightOrDark component will be available using scoped slot props:

<LightOrDark width="100" alt="some image">
  <template #dark="props">
    <img src="/dark.png" v-bind="props"/>
  <template #light="props">
    <img src="/light.png" v-bind="props"/>

You can provide markdown in the slots, but you will need to surround the content with blank lines:

  <template #dark>

  <template #light>


Custom Components

Create a directory components/ under your project root, and simply put your custom Vue components under it, then you can use it with the same name in your markdown file!

Read more in the Customization section.

Theme-provided Components

Themes can provide components as well. Please read their documentations for what they have provided.

Check more in the directory structure section.