Exporting to PDF or PNG relies on Playwright for rendering. You will therefore need to install playwright-chromium to use this feature. If you are doing exporting in a CI environment, the playwright CI guide can be helpful.

Install playwright-chromium

$ npm i -D playwright-chromium

Now export your slides to PDF using the following command

$ slidev export

After a few seconds, your slides will be ready at ./slides-exports.pdf.

Export Clicks Steps

Available since v0.21

By default, Slidev exports one page per slide with clicks animations disabled. If you want export slides with multiple steps into multiple pages, pass the --with-clicks options.

$ slidev export --with-clicks


When passing in the --format png option, Slidev will export PNG images for each slide instead of a PDF.

$ slidev export --format png

Single-Page Application (SPA)

You can also build the slides into a self-hostable SPA:

$ slidev build

The generated application will be available under dist/ and then you can host it on GitHub Pages, Netlify, Vercel, or whatever you want. Now you can share your slides with the rest of the world with a single link.

Base Path

To deploy your slides under sub-routes, you will need to pass the --base option. For example:

$ slidev build --base /talks/my-cool-talk/

Refer to Vite's documentation for more details.

Provide Downloadable PDF

You can provide a downloadable PDF to the viewers of your SPA with the following config:

download: true

Slidev will generate a pdf file along with the build and a download button will be displayed in the SPA.

You can also provide a custom url to the PDF. In that case, the rendering process will be skipped.

download: 'https://myside.com/my-talk.pdf'


Here are a few examples of the exported SPA: