Category: Effects & motion
Mass-spring graph: nodes repel each other (Coulomb) and are held by Hooke springs on defined edges. By default a settled, static layout computed server-side, so it works everywhere, including print and assistive tech. Drag-to-pin with live springs is opt-in with interactive: true.
| Field | Type | Required |
|---|---|---|
| nodes | array. Array of {id, label} objects. Defaults to 6 labelled nodes. | optional |
| edges | array. Array of {a, b} index pairs for spring connections. | optional |
| colour | string. Node and edge accent colour. Default | optional |
| bg | string. Background colour. Default | optional |
| height | integer. Canvas height px. Default 420. | optional |
| rest_length | integer. Spring rest length px. Default 110. | optional |
| interactive | boolean. Default false: a settled, static layout that works everywhere and for assistive tech. Set true when the atom is shown in a live browser or app view and the viewer should be able to play with the graph: drag nodes to pin them, watch the springs react. Ignored under reduced motion and on static surfaces (print, slides, email, chat, and any surface that strips scripts). | optional |
{
"type": "spring_nodes"
}
{
"identifier": "urn:air:a2uicatalog.ai:atom:spring_nodes",
"displayName": "Spring Nodes",
"type": "application/vnd.a2ui.atom+json",
"url": "https://a2uicatalog.ai/atoms/spring_nodes/",
"capabilities": [
"google-apps-script-web",
"web",
"google-meet-stage",
"mcp-apps",
"android"
],
"description": "Mass-spring graph: nodes repel each other (Coulomb) and are held by Hooke springs on defined edges. By default a settled, static layout computed server-side, so it works everywhere, including print and assistive tech. Drag-to-pin with live springs is opt-in with interactive: true.",
"representativeQueries": [
"show a mass-spring graph, settled static layout by default; interactive true adds drag-to-pin physics",
"mass-spring graph: nodes repel each other (coulomb) and are held by hooke springs on defined edges.",
"render a spring nodes"
]
}
The renderer is an open-source Google Apps Script web app. Deploy your own instance in 4 commands — you own the URL, no dependency on the demo endpoint.
git clone https://github.com/a2uicatalog/a2ui
cd a2ui/apps-script-surface/gas-wired-renderer
clasp push && clasp deploy
Full deploy guide →