modulatejs the library

ModulateJS is markdown
for UI interactions.

A consistent language for how UI can feel. Whether a human writes it or an LLM does, each has a language that can naturally express feel, play and fun. It is meant to be comprehensive: enough abstractions above Motion and the web APIs that custom JavaScript is never necessary. The aesthetic goals are speed, fidelity and control. A prototype is a link, and the link opens in coral.fm and runs on your phone.

in a page<script src="https://unpkg.com/modulatejs"></script>
on your phonenpx modulatejs proto.js
for Claude Codeclaude mcp add modulatejs -- npx -y modulatejs mcp

Also npm i modulatejs, and https://coral.fm/mcp for any other MCP client. Models read spec.md.

How it reads

A name and a colon always means this name refers to what follows: a layer, or with braces a section, which is a group of every layer made inside it (draw.drift(8) floats them all). A piece draws a layer, verbs chain on it, and after .on(driver) the verbs describe the other state instead. That is the whole model. It is JavaScript underneath, so anything else you need is there.

Every word

Made from spec.md when the site is built, so it is never behind. Long ones open when you click them.

Licences

modulate.js, the runtime, is MIT: embed it anywhere. The editor and the CLI are AGPL-3.0: read them, fork them, run them locally; a hosted clone publishes its changes. The spec and the prototypes are CC BY 4.0, meant to be copied into prompts and docs. Built on Motion (MIT); full notices in THIRD_PARTY.md.