Frontend Slides
Create zero-dependency, animation-rich HTML presentations that run entirely in the browser.
Core Principles
- Zero Dependencies — Single HTML files with inline CSS/JS. No npm, no build tools.
- Show, Don't Tell — Generate 3 visual previews before building. People discover what they want by seeing options, not describing them.
- Distinctive Design — No generic slides. Every presentation must feel custom-crafted.
- Viewport Fitting (NON-NEGOTIABLE) — Every slide MUST fit exactly within 100vh. No scrolling within slides ever. Content overflows? Split into multiple slides.
Workflow
Phase 1 — Gather Content
Ask the user:
- "What's the topic and goal? (e.g. investor pitch, product demo, teaching a concept)"
- "Who is the audience?"
- "How many slides roughly?"
- "Paste your content, bullets, or outline — OR share a .pptx file path to convert."
If a .pptx file is provided → jump to Phase 4 (PowerPoint Conversion) first, then return here.
Phase 2 — Style Selection (Always Do This)
Ask the user their vibe (multiselect, max 2):
- Impressed / Confident
- Excited / Energized
- Calm / Focused
- Inspired / Moved
Map their vibe to 3 distinct presets from this list and generate one single-slide HTML preview for each:
| Preset |
Feel |
| Bold Signal |
Dark, high-contrast, confident |
| Electric Studio |
Vibrant neon on dark, energized |
| Dark Botanical |
Dark with organic texture, calm authority |
| Notebook Tabs |
Light, handwritten-feel, approachable |
| Pastel Geometry |
Soft colors, geometric shapes, friendly |
| Neon Cyber |
Cyberpunk grid, glowing text, futuristic |
| Creative Voltage |
Bold gradients, dynamic diagonals |
| Split Pastel |
Two-tone split layout, modern editorial |
| Paper & Ink |
Cream background, serif type, classic |
| Swiss Modern |
Brutalist grid, red + black, no-nonsense |
| Vintage Editorial |
Magazine-style, muted tones, typographic |
| Minimal Zen |
White space, single accent color, clean |
Save 3 preview files to .claude-design/slide-previews/ as style-a.html, style-b.html, style-c.html and open them.
Wait for the user to pick one (A, B, or C) — or ask to mix elements from two.
Phase 3 — Build the Full Deck
Using the chosen style, generate the complete single-file HTML presentation.
Slide structure rules:
- Every slide headline = one complete insight, not a topic label
- Bad: "Market Opportunity"
- Good: "The $4B SMB payroll market is 80% undigitized"
- Body supports the headline — never repeats it
- Max bullets/content per slide type:
| Slide Type |
Maximum Content |
| Title |
1 heading + 1 subtitle + optional tagline |
| Content |
1 heading + 4–6 bullets OR 2 paragraphs |
| Feature grid |
1 heading + 6 cards max (2×3 or 3×2) |
| Code |
1 heading + 8–10 lines of code |
| Quote |
1 quote (max 3 lines) + attribution |
| Image |
1 heading + 1 image (max 60vh) |
Required slides:
- Title slide
- Agenda (for decks over 8 slides)
- Content slides
- Summary / So what
HTML requirements:
- Fully self-contained — no external CDN, no imports
- Keyboard navigation: arrow keys + spacebar
- Progress indicator
- Speaker notes in hidden
<div> (toggle with N key)
prefers-reduced-motion support
Viewport fitting (mandatory):
- Every
.slide: height: 100vh; height: 100dvh; overflow: hidden;
- All font sizes:
clamp(min, preferred, max) — never fixed px/rem
- Images:
max-height: min(50vh, 400px)
- Media breakpoints at 700px, 600px, 500px height
- Never negate CSS functions directly — use
calc(-1 * clamp(...))
Output the complete HTML file. Default filename: presentation.html.
Phase 4 — PowerPoint Conversion (if .pptx provided)
- Run the extractor (auto-installs
python-pptx if needed):pip install python-pptx -q
python -c "
from pptx import Presentation
import json, sys
prs = Presentation(sys.argv[1])
slides = []
for i, slide in enumerate(prs.slides):
texts = [shape.text for shape in slide.shapes if shape.has_text_frame]
slides.append({'slide': i+1, 'content': texts})
print(json.dumps(slides, indent=2))
" <path_to_pptx>
- Confirm extracted slide titles, content summaries, and image counts with the user.
- Proceed to Phase 2 for style selection.
- Generate HTML preserving all text, slide order, and speaker notes (as HTML comments).
Optional Post-Build
Deploy to Vercel (requires Node + Vercel CLI):
vercel deploy ./presentation.html
Export to PDF (requires Node + Playwright):
npx playwright install chromium --with-deps
node -e "
const { chromium } = require('playwright');
(async () => {
const browser = await chromium.launch();
const page = await browser.newPage();
await page.goto('file://' + require('path').resolve('presentation.html'));
await page.pdf({ path: 'presentation.pdf', printBackground: true });
await browser.close();
console.log('Saved: presentation.pdf');
})();
"
Source
Based on frontend-slides by Zara Zhang Rui.
1---2name: frontend-slides3description: Create stunning, animation-rich single-file HTML presentations from scratch or by converting a PowerPoint (.pptx) file. Use when the user wants to build a presentation, convert a PPT to web format, or create slides for a talk, pitch, or demo. Shows 3 visual style previews before building the full deck — no design experience needed.4---56# Frontend Slides78Create zero-dependency, animation-rich HTML presentations that run entirely in the browser.910## Core Principles11121. **Zero Dependencies** — Single HTML files with inline CSS/JS. No npm, no build tools.132. **Show, Don't Tell** — Generate 3 visual previews before building. People discover what they want by seeing options, not describing them.143. **Distinctive Design** — No generic slides. Every presentation must feel custom-crafted.154. **Viewport Fitting (NON-NEGOTIABLE)** — Every slide MUST fit exactly within 100vh. No scrolling within slides ever. Content overflows? Split into multiple slides.1617---1819## Workflow2021### Phase 1 — Gather Content2223Ask the user:241. "What's the topic and goal? (e.g. investor pitch, product demo, teaching a concept)"252. "Who is the audience?"263. "How many slides roughly?"274. "Paste your content, bullets, or outline — OR share a .pptx file path to convert."2829If a `.pptx` file is provided → jump to **Phase 4 (PowerPoint Conversion)** first, then return here.3031---3233### Phase 2 — Style Selection (Always Do This)3435Ask the user their vibe (multiselect, max 2):36- Impressed / Confident37- Excited / Energized38- Calm / Focused39- Inspired / Moved4041Map their vibe to 3 distinct presets from this list and generate one single-slide HTML preview for each:4243| Preset | Feel |44|---|---|45| Bold Signal | Dark, high-contrast, confident |46| Electric Studio | Vibrant neon on dark, energized |47| Dark Botanical | Dark with organic texture, calm authority |48| Notebook Tabs | Light, handwritten-feel, approachable |49| Pastel Geometry | Soft colors, geometric shapes, friendly |50| Neon Cyber | Cyberpunk grid, glowing text, futuristic |51| Creative Voltage | Bold gradients, dynamic diagonals |52| Split Pastel | Two-tone split layout, modern editorial |53| Paper & Ink | Cream background, serif type, classic |54| Swiss Modern | Brutalist grid, red + black, no-nonsense |55| Vintage Editorial | Magazine-style, muted tones, typographic |56| Minimal Zen | White space, single accent color, clean |5758Save 3 preview files to `.claude-design/slide-previews/` as `style-a.html`, `style-b.html`, `style-c.html` and open them.5960Wait for the user to pick one (A, B, or C) — or ask to mix elements from two.6162---6364### Phase 3 — Build the Full Deck6566Using the chosen style, generate the complete single-file HTML presentation.6768**Slide structure rules:**69- Every slide headline = one complete insight, not a topic label70 - Bad: "Market Opportunity"71 - Good: "The $4B SMB payroll market is 80% undigitized"72- Body supports the headline — never repeats it73- Max bullets/content per slide type:7475| Slide Type | Maximum Content |76|---|---|77| Title | 1 heading + 1 subtitle + optional tagline |78| Content | 1 heading + 4–6 bullets OR 2 paragraphs |79| Feature grid | 1 heading + 6 cards max (2×3 or 3×2) |80| Code | 1 heading + 8–10 lines of code |81| Quote | 1 quote (max 3 lines) + attribution |82| Image | 1 heading + 1 image (max 60vh) |8384**Required slides:**851. Title slide862. Agenda (for decks over 8 slides)873. Content slides884. Summary / So what8990**HTML requirements:**91- Fully self-contained — no external CDN, no imports92- Keyboard navigation: arrow keys + spacebar93- Progress indicator94- Speaker notes in hidden `<div>` (toggle with `N` key)95- `prefers-reduced-motion` support9697**Viewport fitting (mandatory):**98- Every `.slide`: `height: 100vh; height: 100dvh; overflow: hidden;`99- All font sizes: `clamp(min, preferred, max)` — never fixed px/rem100- Images: `max-height: min(50vh, 400px)`101- Media breakpoints at 700px, 600px, 500px height102- Never negate CSS functions directly — use `calc(-1 * clamp(...))`103104Output the complete HTML file. Default filename: `presentation.html`.105106---107108### Phase 4 — PowerPoint Conversion (if .pptx provided)1091101. Run the extractor (auto-installs `python-pptx` if needed):111 ```bash112 pip install python-pptx -q113 python -c "114 from pptx import Presentation115 import json, sys116 prs = Presentation(sys.argv[1])117 slides = []118 for i, slide in enumerate(prs.slides):119 texts = [shape.text for shape in slide.shapes if shape.has_text_frame]120 slides.append({'slide': i+1, 'content': texts})121 print(json.dumps(slides, indent=2))122 " <path_to_pptx>123 ```1242. Confirm extracted slide titles, content summaries, and image counts with the user.1253. Proceed to Phase 2 for style selection.1264. Generate HTML preserving all text, slide order, and speaker notes (as HTML comments).127128---129130## Optional Post-Build131132**Deploy to Vercel** (requires Node + Vercel CLI):133```bash134vercel deploy ./presentation.html135```136137**Export to PDF** (requires Node + Playwright):138```bash139npx playwright install chromium --with-deps140node -e "141const { chromium } = require('playwright');142(async () => {143 const browser = await chromium.launch();144 const page = await browser.newPage();145 await page.goto('file://' + require('path').resolve('presentation.html'));146 await page.pdf({ path: 'presentation.pdf', printBackground: true });147 await browser.close();148 console.log('Saved: presentation.pdf');149})();150"151```152153---154155## Source156157Based on [frontend-slides](https://github.com/zarazhangrui/frontend-slides) by Zara Zhang Rui.