|
| 1 | +--- |
| 2 | +name: slides |
| 3 | +description: >- |
| 4 | + Build a premium PRESENTED slide deck — classic one-slide-at-a-time slides you |
| 5 | + advance with a clicker — as a Vite + React app. It keeps the Slidev navigation UI |
| 6 | + (floating glass dock + thumbnail rail + click-builds + presenter) but slides are |
| 7 | + RESPONSIVE React (reflow to any screen, no fixed canvas) and fully interactive. |
| 8 | + Use this for a deck you'll PRESENT (talk over, projector, screen-share) when you |
| 9 | + want web interactivity and responsiveness without Slidev's constraints. The repo |
| 10 | + IS the running app (Vite + React) — you install it in place, theme the tokens, and |
| 11 | + AUTHOR an original deck from the user's real topic/brand. |
| 12 | +--- |
| 13 | + |
| 14 | +# Slides — a premium, responsive, React presentation engine for Bolt |
| 15 | + |
| 16 | +Classic **paged** slides (advance one at a time, present over them) — but rebuilt in |
| 17 | +**Vite + React** so each slide is a **responsive web layout** instead of a fixed |
| 18 | +1080×607 canvas that clips. It keeps the Slidev UI you liked (the floating dock + |
| 19 | +thumbnail rail + click-builds + presenter) and adds real web interactivity. |
| 20 | + |
| 21 | +Two halves — keep them separate: |
| 22 | + |
| 23 | +- **The engine + UI are pre-built** — this repo is a complete, runnable app: the paged |
| 24 | + engine (`src/deck/`), the dock/rail chrome, the section components (`src/components/`), |
| 25 | + the shared CSS. **Leave the engine as-is. Never regenerate it.** This is the part you |
| 26 | + liked; it must look/behave identically. |
| 27 | +- **The content is authored fresh, every time** — the slides (topic, structure, copy, |
| 28 | + visuals, theme) are designed from scratch for *this* request. |
| 29 | + |
| 30 | +> **Theme surface.** All color, type, radius, depth, and motion live in the `:root` |
| 31 | +> token vocabulary of `src/styles/tokens.css`. Theme a brand once, there. |
| 32 | +
|
| 33 | +## ⛔ Two hard rules |
| 34 | + |
| 35 | +1. **Don't touch the engine** — leave `src/deck/` (the engine + chrome: `Deck`, `Slide`, |
| 36 | + `Build`, `Reveal`, `DeckContext`, `icons`, `Annotator`, `useInView`) untouched. Don't |
| 37 | + rewrite or paraphrase the engine or the chrome; author *around* it. |
| 38 | +2. **Author the deck from the user's REAL input — do not reskin the starter.** |
| 39 | + `src/App.tsx` is a throwaway that only proves it runs. **Delete its slides and |
| 40 | + write a new deck.** Never reuse its order, copy, placeholders, or fake names. |
| 41 | + |
| 42 | +--- |
| 43 | + |
| 44 | +## Step 0 — Ground the deck in the user's real input |
| 45 | + |
| 46 | +Use the user's real topic, brand, document, facts. Never fabricate a placeholder |
| 47 | +company, logo, or quote for a real subject. If a URL/brand is given, the theme comes |
| 48 | +from that brand — fetch the page for real colors/font/logo, or use the brand's known |
| 49 | +palette, or **STOP and ask**. Report which colors/fonts you used and where from. |
| 50 | + |
| 51 | +--- |
| 52 | + |
| 53 | +## Step 1 — Run it in place (the repo is the app) |
| 54 | + |
| 55 | +The repo root is already a complete Vite + React app — no scaffolding or copying. Its |
| 56 | +layout: |
| 57 | + |
| 58 | +``` |
| 59 | +package.json vite.config.ts tsconfig*.json index.html src/main.tsx |
| 60 | +src/App.tsx ← THROWAWAY. delete its slides; author the real deck. |
| 61 | +src/styles/ tokens.css (edit :root ONLY) · base.css ← don't edit base.css |
| 62 | +src/deck/ Deck Slide Build Reveal DeckContext useInView icons Annotator ← engine + UI. LOCKED. |
| 63 | +src/components/ CountUp TiltCard Marquee Bento Split StatGrid VisualDashboard Accordion |
| 64 | + Comparison Tabs Timeline CodeWindow BrowserFrame SpotlightCard Charts |
| 65 | +``` |
| 66 | + |
| 67 | +`npm install && npm run dev` runs the deck at `/`. Verify the dock / thumbnail rail / |
| 68 | +click-builds work, then delete the starter slides and author the real deck in |
| 69 | +`App.tsx`. |
| 70 | + |
| 71 | +--- |
| 72 | + |
| 73 | +## Step 2 — Theme it (edit only the `:root` block) |
| 74 | + |
| 75 | +All color, type, radius, depth, motion live in `src/styles/tokens.css` `:root`. |
| 76 | +**Change values, never variable names.** Nine ready-made theme families to pull from |
| 77 | +(dark product, editorial luxury, Swiss, dark technical, warm minimal, |
| 78 | +fintech, aurora glass, cinematic, paper editorial). One accent, used sparingly. |
| 79 | +Dark vs light: set `html { color-scheme }` in base.css and pick `--bg`/`--fg` |
| 80 | +accordingly. Set fonts in `--font-head`/`--font-body` and the `@import` at the top |
| 81 | +of `base.css`. Derive from the brand when given. |
| 82 | + |
| 83 | +--- |
| 84 | + |
| 85 | +## Step 3 — Author slides (each child of `<Deck>` is one slide) |
| 86 | + |
| 87 | +Compose slides in `App.tsx`. The building blocks: |
| 88 | + |
| 89 | +- **`<Slide>`** — one slide. `center` for cover/statement/quote/CTA; `full` for |
| 90 | + edge-to-edge; `nav="Label"`; `notes="…"` (editable in the presenter overlay). |
| 91 | +- **`<Split>`** — text + edge-to-edge media (`flip` swaps). media = `<img>`, a color |
| 92 | + panel, a `<BrowserFrame>`, or `<TiltCard><VisualX/></TiltCard>`. |
| 93 | +- **`<Bento>`** — asymmetric tile grid; tiles take `c`/`r` spans + `variant`. |
| 94 | +- **`<StatGrid>`** — responsive proof cards; pass a `<CountUp>` as a stat `value`. |
| 95 | +- **`<Comparison>`** — us-vs-them feature matrix; one column highlighted in the accent. |
| 96 | +- **`<Tabs>`** — tabbed content with a sliding accent pill. |
| 97 | +- **`<Accordion>`** — expand/collapse panels (FAQ, feature detail). |
| 98 | +- **`<Timeline>`** — vertical roadmap that draws its connector + milestones in. |
| 99 | +- **`<CodeWindow>`** — macOS code window with line numbers + line highlight. |
| 100 | +- **`<BrowserFrame>`** — browser chrome around a screenshot / full-bleed app mock |
| 101 | + (fill it edge-to-edge — a real-looking app screen, not a floating card). |
| 102 | +- **`<SpotlightCard>`** — card with a cursor-follow accent glow (Linear/Vercel hover). |
| 103 | +- **Charts** — `<BarChart>` / `<LineChart>` / `<DonutChart>`, all draw-in on view. |
| 104 | +- **Atoms** (CSS classes): `.display .headline .lead .subhead .kicker .figure |
| 105 | + .accent-text .rule`. All fluid (`clamp()`). |
| 106 | + |
| 107 | +**Compose like the web, not like slideware** (same discipline as the other skills): |
| 108 | +full-bleed, layered; `Bento`/`Split` over a centered row of equal cards; oversized type |
| 109 | +with one accent word; vary the rhythm so no two adjacent slides share a shape; one idea |
| 110 | +per slide; open on a cover, close on a CTA. |
| 111 | + |
| 112 | +> **Centering rule:** left-aligned/asymmetric layouts need a **side visual** (a `Split`, |
| 113 | +> an image, a `BrowserFrame`). A **text-only** section anchored left reads as off-center |
| 114 | +> — center those: a centered heading over a centered content block (e.g. |
| 115 | +> `marginInline:'auto'`). `Comparison`, `Tabs`, `Timeline`, `Accordion`, `StatGrid` look |
| 116 | +> best centered unless paired with a side visual. |
| 117 | +
|
| 118 | +### Interactivity: click-builds (the signature) |
| 119 | +Reveal content in beats with **`<Build at={n}>`** — it stays hidden until you advance |
| 120 | +to step `n` on that slide, then animates in. Advancing (→ / space / Next) reveals the |
| 121 | +next build, then moves to the next slide. Use it for: the punchline after its setup, |
| 122 | +each step of a process, items appearing in turn. Use **`<Reveal>`** for an on-enter |
| 123 | +entrance (no click needed) on headlines/grids. |
| 124 | + |
| 125 | +**Auto-play mode.** The same `<Build>`s can instead reveal **automatically, staggered, |
| 126 | +on slide load** — no clicking. Toggle it live with the dock's auto button or the `A` |
| 127 | +key, or start the deck in auto mode with **`<Deck autoplay>`** (tune the gap with |
| 128 | +`<Deck stagger={0.16}>`, seconds). Ideal for a self-running deck or mobile viewing; |
| 129 | +click-mode stays the default. |
| 130 | + |
| 131 | +```tsx |
| 132 | +<Slide center nav="The shift" notes="Pause, then reveal each point."> |
| 133 | + <h2 className="headline" style={{ marginInline: 'auto' }}>Three things changed.</h2> |
| 134 | + <Build at={1}><p className="lead" style={{ marginInline: 'auto' }}>First, the data got bigger.</p></Build> |
| 135 | + <Build at={2}><p className="lead" style={{ marginInline: 'auto' }}>Then, the tools got faster.</p></Build> |
| 136 | + <Build at={3}><p className="lead" style={{ marginInline: 'auto' }}>Now, anyone can ship.</p></Build> |
| 137 | +</Slide> |
| 138 | +``` |
| 139 | + |
| 140 | +--- |
| 141 | + |
| 142 | +## Step 4 — Responsive, not fixed (no clipping) |
| 143 | + |
| 144 | +Each slide is a **full-viewport responsive layout**, not a fixed canvas — it reflows |
| 145 | +to the screen, so nothing scales-and-clips: |
| 146 | + |
| 147 | +- **Fluid sizing.** The atoms use `clamp()`; use `%`, `vw`, `rem`, `max-width` |
| 148 | + containers — not fixed pixel widths that break on small screens. |
| 149 | +- **One idea per slide**, sized to fill ~one screen with deliberate negative space. |
| 150 | +- **Check a narrow viewport** — `Bento`/`Split` stack (built in); make sure headlines |
| 151 | + don't overflow and nothing needs scrolling. (The thumbnail rail renders each slide |
| 152 | + at true size and scales it, so previews stay faithful.) |
| 153 | +- **No fixed heights on content** — let it flow; reserve fixed sizes for media panels. |
| 154 | + |
| 155 | +--- |
| 156 | + |
| 157 | +## Step 5 — Visuals & imagery |
| 158 | + |
| 159 | +Visuals must fit the topic (same rules as the other skills): data/SaaS → a `.vframe` |
| 160 | +mock (`VisualDashboard` is an *example* — build topic-fit ones with real data); |
| 161 | +brand/product/editorial/real-world → **generate images** into `public/`, one |
| 162 | +consistent style, used as `Split` media or full-bleed slide backgrounds under a |
| 163 | +gradient scrim (no text in images). A `Split` or full-bleed image beats a floating card. |
| 164 | + |
| 165 | +--- |
| 166 | + |
| 167 | +## Step 6 — Motion (with restraint) |
| 168 | + |
| 169 | +`Build` (click reveals), `Reveal` (on-enter entrance), `CountUp` (hero figures), |
| 170 | +`VisualDashboard` / `Timeline` / the charts (draw themselves in on view via the |
| 171 | +`useInView` hook), `TiltCard` + `SpotlightCard` (cursor interaction), `Marquee` (logo |
| 172 | +strip), `Tabs` (sliding pill). The ambient background (drifting spotlights + grain + |
| 173 | +vignette) and the slide-change transition are automatic. **One or two motion ideas per |
| 174 | +slide**, never a circus. All honors `prefers-reduced-motion`. |
| 175 | + |
| 176 | +--- |
| 177 | + |
| 178 | +## Extend the system — invent new slides, components & visuals |
| 179 | + |
| 180 | +The kit is a **floor, not a ceiling.** The bundled components cover a lot (comparison, |
| 181 | +tabs, timeline, charts, code/browser frames, accordion, bento, split…) — but author |
| 182 | +new ones for the topic when nothing fits: a `<Pricing>` table, a Gantt, a device/phone |
| 183 | +mock, a chat or kanban mock, a map. Only the token *names* and `src/deck/` (engine + |
| 184 | +chrome) are off-limits to rewrite; **adding** components/visuals is encouraged. Every |
| 185 | +new piece must: use `var(--…)` tokens only (no raw hex), compose like a web section, be |
| 186 | +responsive (work on mobile), animate with `Reveal`/`Build`/`useInView` + honor |
| 187 | +reduced-motion, use tabular figures, and add **no new dependencies** (plain React + |
| 188 | +CSS + SVG). |
| 189 | + |
| 190 | +--- |
| 191 | + |
| 192 | +## Step 7 — Structure & writing |
| 193 | + |
| 194 | +Pick an arc that fits the deck type (pitch, launch, brand, teaching, report) — |
| 195 | +structure follows content. Open on a cover, close on a CTA. ~8–16 slides sized to the |
| 196 | +material. Headlines short, declarative, specific (sentence case); body 1–3 tight |
| 197 | +sentences; 1–3 word kickers; one idea per slide. Use the user's real numbers; never |
| 198 | +invent numbers for a real brand. Zero lorem, zero placeholder names. Add `notes` for |
| 199 | +talking points where useful. |
| 200 | + |
| 201 | +--- |
| 202 | + |
| 203 | +## Definition of done (self-check) |
| 204 | + |
| 205 | +- [ ] The engine + chrome in `src/deck/` are **left untouched**; the |
| 206 | + dock + thumbnail rail appear, arrow keys advance AND step back through builds, |
| 207 | + auto-play / fullscreen / overview work, annotation (D) has full tools and |
| 208 | + persists per slide, presenter (P) opens a synced new tab, `H` hides the UI, and |
| 209 | + the URL hash tracks the slide. |
| 210 | +- [ ] The deck is **authored, not reskinned** — topic, structure, copy, names are the |
| 211 | + user's, with no starter leftovers (no "Title"/"Northwind"). |
| 212 | +- [ ] If a brand/URL was given, `--primary`, fonts, and logo come from that brand. |
| 213 | +- [ ] Only the `:root` block was edited for the theme; editing `--primary` recolors |
| 214 | + everything incl. the dock. |
| 215 | +- [ ] Slides compose like web sections (full-bleed/asymmetric/bento/split), not |
| 216 | + centered card rows; visuals fit the topic; brand decks have generated images. |
| 217 | +- [ ] **Responsive:** looks right narrow + wide — sections stack, nothing clips or |
| 218 | + needs scrolling. Builds reveal in the intended order. |
| 219 | +- [ ] Motion is restrained; reduced-motion respected. |
| 220 | +- [ ] `npm install && npm run dev` runs with no console errors; `npm run build` passes. |
0 commit comments