Components in Slides â
One of the most powerful features of Slidev is the ability to use Vue components directly in your slides. This allows you to create interactive and dynamic content with ease.
Using Components â
With the help of unplugin-vue-components
, Slidev allows you to use Vue components directly in your slides without importing them manually:
md
# My Slide
<MyComponent :count="4"/>
The components come from:
- Built-in components. See Built-in Components for reference.
- Provided by the theme and addons. See đ Theme & Addons.
- Custom components in the
components
directory. See the next section.
Writing Components â
To create a custom component, simply create a new Vue file in the components
directory:
bash
your-slidev/
âââ ...
âââ slides.md
âââ components/
âââ ...
âââ MyComponent.vue
Refer to the Vue documentation for how to write Vue components.
You can also đ Writing Addons to reuse and share your components with others.