Skip to main content

Playground

Run Lea right here — edit the code and press Run (or Cmd/Ctrl+Enter). The full playground lives at lea.playground.mcclowes.com.

Embed it in your own site

The playground exposes a slim /embed route designed to be dropped into any page via an <iframe>. Embed mode hides the site header and persistence, leaving just the editor, output, and a Run button.

<iframe
src="https://lea.playground.mcclowes.com/embed"
title="Lea Playground"
style="width: 100%; height: 460px; border: 0; border-radius: 8px;"
loading="lazy">
</iframe>

Every response sends Content-Security-Policy: frame-ancestors *, so any site may embed it.

Preset the code

Pass a code query parameter (URL-encoded) to seed the editor:

<iframe
src="https://lea.playground.mcclowes.com/embed?code=%5B1%2C2%2C3%5D%20%2F%3E%20map((x)%20-%3E%20x%20*%20x)%20%2F%3E%20print"
title="Lea Playground"
style="width: 100%; height: 460px; border: 0;">
</iframe>

For source with awkward characters, use code64 with URL-safe base64 instead.

Options

ParamValuesDefaultDescription
codeURL-encoded sourcewelcome snippetInitial editor contents
code64URL-safe base64 sourceInitial contents (alternative to code)
themelight | darksite/systemForce a theme to match your page
toolbarfull | minminfull shows Examples / Syntax / Download
examples0 | 1follows toolbarToggle the Examples button
syntax0 | 1follows toolbarToggle the Syntax button
download0 | 1follows toolbarToggle the Download button
open0 | 11Toggle the "Open in playground" link