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-player> web component.

REA Source

Preview

The player component loads at runtime. If you see this message, the <reast-player> 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-player> 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