Changing the theme in Slidev is surprisingly easy. All you need to do is to add the
theme: field in your frontmatter.
Note To install a theme from a scoped package, you will have to give the full namespace e.g
You can start the server, which will prompt you to install the theme automatically
? The theme "@slidev/theme-seriph" was not found in your project, do you want to install it now? › (Y/n)
or install the theme manually via
$ npm install @slidev/theme-seriph
And that's all, enjoy the new theme! For more details about the usage, you can refer to the theme's README.
Want to share your theme? Learn about how to write a theme.
If you want to get full control of the current theme, you can eject it to your local file system and modify it as you want. By running the following command
$ slidev theme eject
It will eject the theme you are using currently into
./theme, and changed your frontmatter to
This could also be helpful if you want to make a theme based on an existing one. If you do, remember to mention the original theme and the author 😃
As you probably found out from the previous section, you can have a local theme for your project. By having a relative path in your theme field.
Refer to how to write a theme for more details.