Getting Started
What is metaframe-js?
js.mtfm.io lets you run arbitrary JavaScript modules directly in the browser, with all code embedded in the URL. There is no server-side storage — the URL is the program.
It is designed for embedding anywhere and combining into metapages so you can connect inputs and outputs to other metaframe URLs or jupyter notebook code. Similar to CodePen or JSFiddle, but completely self-contained.
How to use it
- Go to js.mtfm.io
- Write JavaScript in the editor or edit with AI
- The code runs immediately — the URL updates to contain your code
- Share the URL with anyone
JavaScript overview
- Code is an ES6 module
- Top-level
awaitis supported - Export
onInputsto listen to inputs from connected metaframes - Send outputs with
setOutput/setOutputs - Export
onResizeto handle window/div resizes - Use ES6 module imports, or add CSS / npm modules — everything is embedded in the URL
See the full JavaScript API for details.
Python widget
Install the metaframe-widget package to use any metaframe as an interactive widget in Jupyter or marimo:
bash
pip install metaframe-widgetSee Jupyter integration and marimo integration for usage.