HTML component playground

Paste or open one HTML file with its markup, styles and scripts, and watch it render as you type. Check the layout at three widths, in both text directions and in both themes before you ship it.

Sign in to save this tool

Lines: 61 · ⁨2.5 KB⁩

or drop it here

Preview

Width
Direction
Theme

Sets data-theme and the colour scheme. Library templates follow the colour scheme.

The preview runs in an isolated sandbox with no network access: its scripts work, but they cannot reach this page, its storage, your cookies or other sites. External fonts, images and scripts do not load.

Start from a real template: pick one in the component library and choose “Open in playground”.

How to use it

  1. Edit the sample, paste your own HTML, or open an .html file from your device.
  2. Watch the preview update a moment after you stop typing.
  3. Switch the width to mobile, tablet or desktop, the direction to LTR or RTL, and the theme to light or dark.
  4. Copy the result or download it as a .html file.
  5. To start from a ready-made template, open one in the component library and choose “Open in playground”.

Supported formats and limits

  • One HTML document of up to 500 KB is previewed; files you open can be up to 500 KB.
  • The preview has no network access: external stylesheets, fonts, images and scripts do not load. Inline CSS, inline scripts and data: images work.
  • The theme switch sets data-theme="light" or "dark" on the html element and the frame’s colour scheme; your CSS decides what changes.
  • Forms, pop-ups and navigation inside the preview are blocked by the sandbox.

Examples

  • Check that a card layout mirrors correctly in Arabic before adding it to your app.
  • Tweak a dashboard template from the component library and download your version.
  • Test a responsive navigation bar at phone and tablet width without resizing the browser.

Frequently asked questions

Is it safe to paste HTML from somewhere else?

The preview runs in a sandboxed frame with its own opaque origin and no network access. Its scripts run, but they cannot read this page, its storage or your cookies, and cannot send data anywhere.

Is my code uploaded or saved?

No. Everything stays in this browser tab. Nothing is stored, so download or copy your work before you close the page.

Why does my external CSS framework or font not load?

The sandbox blocks every network request, so links to CDNs are ignored. Paste the CSS into a style element instead, which is also how the library templates are built.