What a deck can — and can’t — load.
Published decks run inside a locked-down sandbox. Anything the rules below don’t allow is silently blocked in the viewer’s browser — the deck still opens, but the blocked piece just won’t be there. Get it right at build time and everything works first try.
Building the deck with AI? Start here.
Most decks are generated by an AI agent, not written by hand. Paste this brief into your agent before it starts building and it will produce a deck that passes the sandbox rules first time.
# Hyper Decks — constraints for generated HTML decks
The HTML you produce will be uploaded to Hyper Decks and served under a strict
Content Security Policy. Anything that breaks these rules is silently blocked
in the viewer's browser, so treat them as hard requirements.
## Make it self-contained
- Inline all CSS and JavaScript, or ship them as separate files next to
index.html and reference them with RELATIVE paths (./app.js, css/style.css).
- Embed images and media as data: URIs, or include the files in the bundle.
- Never load libraries from a CDN (unpkg, jsdelivr, cdnjs, esm.sh, the
Tailwind CDN, etc.). Vendor the library code into the bundle instead.
## The single exception: Google Fonts
- Stylesheets from https://fonts.googleapis.com and the font files they pull
from https://fonts.gstatic.com are allowed. No other external host is.
- Always declare fallback fonts in every font-family stack.
## No network at runtime
- fetch(), XMLHttpRequest, WebSockets and EventSource are all blocked
(connect-src 'none'). No live APIs, no analytics, no telemetry.
Embed any data the deck needs as JSON inside the bundle.
- <form> submissions to external URLs are blocked (form-action 'none').
- External <iframe>, <img>, <video> and <audio> sources are blocked.
- The deck cannot navigate the top-level page, and popups it opens stay
sandboxed with the same restrictions.
## What IS allowed
- Inline <script> and <style>, eval() / new Function(), canvas and WebGL.
- data: and blob: URLs, including blob-based Web Workers.
- localStorage / sessionStorage (scoped to the deck's own origin).
- Client-side interactivity of any kind — navigation between slides,
charts, animations — as long as it needs no network.
## Packaging
- Either one self-contained .html file, or a folder / .zip whose entry point
is index.html at the top level (a single wrapping folder is fine).
- At most 250 files per bundle and 500 MB per upload.
- No executable file types (.exe, .sh, .bat, .ps1, .msi, .jar, ...) —
bundles containing one are rejected at upload.
## Before you finish
- Search your output for "http://" and "https://" — every match must be a
Google Fonts URL or plain text, never something the page loads or calls.
External sources: allowed vs blocked
Decks are hosted on an isolated domain with a Content Security Policy that only permits the deck’s own bundled files — plus one carve-out for Google Fonts. That is what keeps a published deck from phoning home, tracking viewers, or being altered from outside after you’ve shipped it.
Works
- Everything inlined: CSS, JavaScript, SVG in the HTML itself
- Files bundled alongside
index.html, referenced by relative path - Images and media as
data:URIs or bundled files - Google Fonts (
fonts.googleapis.com/fonts.gstatic.com) — the only external host - Full interactivity: slide navigation, charts, animations, canvas, WebGL
blob:URLs, web workers,eval(), local storage
Blocked
- Scripts or styles from any CDN — unpkg, jsdelivr, cdnjs, Tailwind CDN…
fetch()/ XHR / WebSockets to anywhere — no live APIs, no analytics- Images, video, audio or iframes loaded from external URLs
- Form submissions to external endpoints
- Redirecting the viewer’s tab, or popups that escape the sandbox
- 250 files max
- 500 MB per upload
- index.html at top level
- no executables
Nothing errors — it just isn’t there.
Nothing errors at upload time — the publisher shows a warning if it spots external
references, but the deck still publishes. The block happens in the viewer’s browser:
an external chart library simply never loads, a fetch() quietly fails, an
external image renders as a gap. If a deck looks broken for a client, an external
reference is the first thing to check.
Three ways to hand us a deck.
- Single file — one self-contained
.html. Simplest and most reliable. - Zip — a
.zipwithindex.htmlat the top level (or inside one wrapping folder). Preferred for multi-file bundles. - Folder — uploads each file individually; fine for small bundles, zip is sturdier for big ones.
- No executables — bundles containing an executable file type (
.exe,.sh,.bat,.msi…) are rejected outright.