Embedding
Put a scene on your own site with the web component, an inline snippet, or standalone HTML
This page covers the three ways to put a txtfx scene on a page you control.
Web component (recommended)
Share a scene to get a short id, then drop it into any page with two lines:
<script src="https://txtfx.app/v1/txtfx-scene.js" async></script>
<txtfx-scene scene-id="abc12345" style="display:block;width:100%;aspect-ratio:16/9"></txtfx-scene>The <txtfx-scene> element loads the scene in a sandboxed iframe from txtfx, so it always uses the latest renderer and never ships a heavy bundle to your page. Size it with normal CSS. Get the snippet from the Embed button on any shared scene page (/s/<id>), or build it yourself from the scene id.
Attributes
scene-id— the short id of a shared scene. Resolves tohttps://txtfx.app/embed/<id>.src— an explicit player URL (overridesscene-id).
Performance is handled for you
The embedded player pauses when off-screen or in a background tab, respects prefers-reduced-motion, and caps DPI and frame rate for battery — no configuration needed.
Self-contained snippet (no upload)
To embed without sharing the scene to txtfx, copy a fully inline snippet — scene data and renderer baked into a single srcdoc iframe:
- Click Export in the toolbar
- Choose Copy embed snippet
- Paste the HTML into your page
This needs no network calls and keeps your image off txtfx's servers, but the snippet is larger and won't pick up new renderer features.
Standalone HTML
Export a full HTML file that opens directly in any browser:
- Click Export in the toolbar
- Choose Standalone HTML
- Open the downloaded
.htmlfile
The file includes the image, all effect settings, and the rendering engine.