Skip to content

Playground

Try the Rea language live in your browser. Type Rea markup in the editor below and see it rendered instantly by the <reast-engine> web component.

Rea Source

Preview

The player component loads at runtime. If you see this message, the <reast-engine> script is not available in this environment. Build and serve the docs with the player package linked to see a live preview.

How it works

The playground creates a <reast-engine> web component and feeds it your Rea source as a blob URL. The player parses the markup using @reast/engine and renders the interactive story directly in the browser.

Supported syntax

Everything from the Rea specification works in the playground:

  • Plain text — paragraphs, headings, emphasis
  • Choices{choice} / {option} / {end choice}
  • Variables{set name = value}, {if condition}...{end if}
  • Commands{image}, {audio}, {timer}, {waypoint}, etc.
  • Logic — expressions, built-in functions, string interpolation

Limitations

  • No file access — commands like {image path.jpg} won't load files in the playground
  • No GPS/NFC/sensors — hardware-dependent commands show placeholder UI
  • No persistence — story state resets on each render