Skip to content

Deployment

Static HTML

Terminal window
react-slides build

Outputs to ./dist. Drop on any static host — Netlify, Vercel, GitHub Pages, S3 + CloudFront, plain nginx.

Custom output dir / base path

Terminal window
react-slides build --out public --base /my-talk/

Or via config:

react-slides.config.ts
import { defineConfig } from '@react-slides/cli'
export default defineConfig({
vite: { base: '/my-talk/' },
})

PDF export

Requires playwright as a peer dependency:

Terminal window
pnpm add -D playwright
pnpm exec playwright install chromium
react-slides export --format pdf --out slides.pdf

HTML export

Terminal window
react-slides export --format html --out slides.html

Single self-contained HTML file — useful for offline distribution.

GitHub Pages

The simplest workflow:

.github/workflows/deploy-slides.yml
name: Deploy slides
on:
push:
branches: [main]
permissions:
contents: read
pages: write
id-token: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with: { node-version: 20, cache: pnpm }
- run: pnpm install --frozen-lockfile
- run: pnpm build
- uses: actions/upload-pages-artifact@v3
with: { path: ./dist }
deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- id: deployment
uses: actions/deploy-pages@v4

Set the base in react-slides.config.ts to /<repo-name>/.

Speaker / presenter window

Use the CLI preview command:

Terminal window
react-slides preview

It serves the presentation and a speaker view, wrapping your slide entry with the same runtime viewer used by dev, build, and export.