DEV Community

Piotr
Piotr

Posted on Originally published at thebuzzbazaar.com

Build interactive widgets with AI (calculators, tabs, sliders)

Describe an interactive widget - a tip calculator, tabbed sections, a slider - and GOMAX builds it with your own AI, ready to drop on a page.

What it is

The AI Builder interactive mode generates a self-contained block that includes client-side JavaScript, so it actually DOES something in the browser - calculates, switches tabs, filters, animates on click. It runs on the AI you connected (your own key or a local model), is saved to your library, and inserts into any page. Unlike server-side code tools, this is browser-only, so it is safe to use on any site.

How it works

When you ask for an interactive block, GOMAX tells your model to return one self-contained fragment: a scoped wrapper, one style block, and ONE script. GOMAX enforces the safety rules on the result: the script may only touch elements inside that block, must use addEventListener (no inline on-click attributes), and runs entirely in the visitor browser - it makes no network calls and cannot build code from strings. GOMAX also strips any external script and any inline event handler before saving. So you get real interactivity with none of the risk of running code on your server - it is the same kind of client-side code a custom-HTML block already allows, just written for you.

How to use it

  • Connect a model in GOMAX and Brain.
  • Generate a block in interactive mode and describe the widget (e.g. "a mortgage calculator").
  • Preview it, then insert it into a page.

Frequently asked questions

Is the JavaScript safe?

Yes. It runs only in the visitor browser, is scoped to the block, uses addEventListener (no inline handlers), makes no network calls, and GOMAX strips external scripts - the same safety envelope as a custom-HTML block.

What kind of widgets can it build?

Client-side ones: calculators, tabs, sliders, filters, toggles, simple quizzes and animations. For server-side features (custom PHP, admin tools) see the separate developer add-on.

Do I need to code?

No. Describe the widget and the AI writes it. You can still edit the code, and deeper Site Brain grounding is on the roadmap.

Top comments (0)