Spark
Vibe coding: from idea to production

Vibe coding: art and tools — generative graphics and interactive builders

Topic 2713 min read + 2 hours for the taskRevised October 10, 2026

The “Vibe coding: websites” topic delivers content, and the “Vibe coding: interfaces” topic manages data and logic. But sometimes the result of vibe coding is the interaction itself, not a website and not a product with a backend. It might be a generative background, a playful micro-tool, a builder where the user turns parameters and watches the result change live, or simply a standalone piece of digital art. Success is measured differently here: not “did it deliver the content” or “did it save the data,” but “is it fun to interact with.”

When you need exactly this scenario

  • A promo page or a brand microsite with a generative animated background instead of a static image.
  • An internal team tool (a palette generator, a pattern builder, a font pairing picker). A small utility that is the product itself, not a helper screen inside something bigger.
  • A portfolio piece that shows your command of interaction by itself, instead of just talking about it.
  • An interactive campaign element: something the audience plays with for the experience itself, not to get information.

A technical vocabulary for visual experiments

  • Canvas API: a canvas built into the browser for drawing pixels with code in real time. The basis of most 2D generative graphics.
  • WebGL and Three.js: access to the graphics card right from the browser, for 3D and complex visual effects. Three.js is the most widely used library, and with it you don’t have to work with WebGL directly.
  • Shader: a small program that calculates the color of each pixel separately and in parallel on the graphics card. Shaders are behind most of those “living,” smoothly flowing generative backgrounds.
  • SVG animation vs Canvas vs WebGL: three different technical routes to a result that looks similar. SVG is easier to edit and better suited to crisp shapes and icons. Canvas is for procedural pixel graphics. WebGL is for when you need real 3D depth or hundreds of objects animating at once. Tell the agent explicitly which route you need instead of leaving the choice to it: the result’s performance depends on it.

You don’t need to be able to write shaders yourself or understand WebGL. The agent writes the code. You need to know the vocabulary well enough to phrase the task precisely and read what the agent proposes with understanding.

Animated gradients and generative backgrounds

The most common request in this scenario is a living, smoothly changing background instead of a static image: mesh gradients, flowing “blobs,” particles, noise. This is where it’s easiest to slide into a ready-made cliché. The signature blue-purple “AI gradient” (the “AI slop” topic) has become such a common default in exactly these generations that it reads on its own as a sign that “a human didn’t make this.” Saying “make a beautiful animated gradient” almost guarantees you’ll get it. Instead, set the palette explicitly in specific hex codes, plus the speed and character of the motion (smooth or sharp, organic or geometric). Otherwise the model picks the most common option.

Two background rectangles. On the left, a blue-purple gradient with blurry light blue and magenta blobs. On the right, a mesh gradient in a warm palette: terracotta, sage, sand and graphite on cream.
On the left is a recreation of the very default agents give you for “make a beautiful animated background.” On the right are the same blurry blobs, but in a brand palette: in a live background they slowly flow into each other. Both are still frames. · CSS, built for this guide

Builders: the tool as the product

A separate genre that’s especially interesting for a designer is a working tool, not an illustration or a background. The user moves the controls, and the result changes live. Technically, it’s the same pattern as precision knobs and style lenses from the “UX patterns for AI features” topic. Only here, the whole product is one such builder, not an element inside a larger interface. Practical examples: a palette generator from a single base color, a pattern builder with density and angle controls, a font pairing picker with a live text preview, a gradient generator that exports CSS code.

The main decision when building a tool like this is what exactly to turn into a live parameter and what to keep fixed. Too many controls make the interface intimidating. Too few don’t let you feel the difference between “playing around” and “real control over the result.”

A special case: vibe coding a Figma plugin

A specific but especially valuable case of the “tool as the product” from the section above is a tool built not as a separate website but directly as a Figma plugin. You don’t need to open a browser and switch between tabs. The tool works on the real file and the real selection you’re already in all day.

There’s also a lighter route to the same result: ask Figma Agent itself to generate a plugin or a shader straight from a prompt, without leaving Figma and without setting up the files below by hand (the “AI inside Figma” topic, the section on generating plugins and shaders). Generation spends Figma AI credits; you can look at the plugin’s code, and you can publish the finished plugin to the Community or within your organization. But the CLI agent route below remains the more flexible and predictable option for anything that should live and evolve beyond a single Figma file.

How it works technically, in broad strokes. A Figma plugin is JS/TS code that runs in its own sandbox inside Figma. It gets access to the file’s layer tree through the figma object (figma.currentPage.selection, figma.root and so on). That’s what sets it apart from a regular vibe-coded website: it has no browser window of its own; it lives inside someone else’s app. The manifest.json file in the plugin’s root describes its name, entry point and permissions. In particular, network access (networkAccess) has to be listed explicitly by domain if the plugin needs to call an external API. Otherwise the request silently fails. If the plugin needs a visual interface (a window with buttons, not just an automatic action), there’s a separate ui.html file for that. It renders in an iframe and talks to the main code through messages (postMessage), because the plugin sandbox has no direct DOM access.

How to build it in practice. The same CLI agent from the “CLI and terminal AI agents” topic (Claude Code, Codex CLI) handles this stack really well. Ask it to sketch out a starter plugin skeleton from Figma’s official template right away. From there, the development loop differs from a website in one detail. Changes don’t just appear when you refresh a browser tab. You import the plugin once in the Figma desktop app through Plugins → Development → “Import plugin from manifest.” After that, after every TypeScript edit you need to rebuild code.ts into code.js (the agent will set up a build command or watch mode) and relaunch the plugin.

You pick manifest.json

A file picker in Figma: the plugin folder is open and manifest.json is selected

The plugin in the Development list

A “Text Splitter has been imported” notification and the plugin list with the Development filter and an Import from manifest item

The plugin is running

The finished Text Splitter plugin window over text on the canvas: a choice of Sentence, Word or Letter and a Run button
Importing your own plugin: Plugins → Development → Import plugin from manifest, pick manifest.json, and the plugin runs in the file right away. Frames from the Figma help center. · Figma · source: help.figma.com
Build a starter skeleton for a Figma plugin in TypeScript: manifest.json, a code.ts entry point with access to figma.currentPage.selection, and a simple ui.html window with a single “Run” button. Explain how to import it into Figma through the Plugins → Development menu for testing

Three specific examples that cover common tasks for different designers:

Grammar check for the text in a project: useful if you work with UX copy a lot and don’t want to copy every label into a separate chat by hand:

Build a Figma plugin that goes through all text layers in the current selection, sends them through a text model API to check grammar and typos, and shows the result in the ui.html panel as a list: layer → error found → suggested fix. Don’t hardcode the API key: let the user enter it once in the plugin panel, and have the plugin store it with figma.clientStorage. The provider is [name, for example Anthropic]: add its domain to networkAccess in manifest.json and add the headers this API requires for requests from a browser

The request to the model from ui.html goes straight from the browser sandbox. Figma lets it through only if the provider’s domain is listed in networkAccess. And the Anthropic API, without a special header for browser requests, rejects it as a CORS error.

Bulk font replacement across the whole project: useful for a rebrand or a move to new typography, when the font is scattered across dozens of components:

Build a Figma plugin with a ui.html window that has two dropdowns, “font to replace” and “font to replace it with” (both filled with the fonts actually used in the file). On the “Replace” button, the plugin finds all text layers with the first font in the whole file, changes them to the second one while keeping the size and style, and shows how many layers were affected

A gradient generator that saves to styles: a quick way to sample variations without opening a separate builder website:

Build a Figma plugin with a ui.html window: two color pickers (start and end color) and a gradient angle slider. On the “Apply” button, the plugin fills the selected layer with a linear gradient with these parameters, and on the “Save as style” button it creates a reusable paint style from it with the given name

Secrets like the API key for the grammar check raise the same question as in the “Securing a vibe-coded project” topic. Don’t hardcode the key in the plugin’s code, especially if you plan to publish the plugin to the Figma Community, where anyone can see the code. An important technical detail: a Figma plugin has no familiar environment variables and no .env file. It runs entirely on the user’s side. There are two working options. First: the user enters their own key in the plugin’s interface, and the plugin stores it locally with figma.clientStorage. Second: the plugin doesn’t call the model API directly but goes through your own small proxy server, where the key lives. The server itself requires authorization (at least a token for the plugin user) and limits the number of requests; otherwise it’s the same leaked key. Don’t forget to list the domain you need in the manifest’s networkAccess. You don’t have to publish your plugin. For personal or team use, it’s enough to keep it imported locally through the Plugins → Development menu.

A special case: vibe coding a Chrome extension

The same “tool as the product” principle as with the Figma plugin above, only the platform is the browser rather than a specific app. It’s useful when the annoyance shows up not in Figma itself but in everyday browsing. You need to regularly record something on screen, pull something off a page, measure or automate something, and the ready-made extension from the Chrome Web Store is either paid or doesn’t do exactly what you need.

How it works technically, in broad strokes. A Chrome extension is also JS/TS code, but with a different structure of permissions and files. manifest.json (the current version is Manifest V3) describes the permissions (permissions) and entry points. A background service worker is code that runs in the background on events rather than constantly, unlike older extensions. A content script is code injected right into the open page that can read and change it, for example scroll it. A popup is a window with an interface that opens when you click the extension’s icon in the browser toolbar. To record a tab, you need to request the tabCapture permission explicitly. Keyboard shortcuts are described in the manifest’s commands section instead of being caught by hand.

A starter prompt, for exactly the case where the task is clear but the implementation isn’t:

I want a Chrome extension that records screencasts of the website open in the current tab. I can choose the resolution and popular aspect ratios, and pick a frame rate from the options that are popular right now. I can turn on auto-scroll with an adjustable speed in pixels per second. Start and stop by hotkeys. Don’t write everything at once: first propose a three-step plan and wait for my “next” after each step

You can’t build an extension like this in one answer. In Manifest V3, recording a tab with tabCapture requires a separate offscreen document, and hotkeys need a separate commands section in the manifest. A sensible order: first recording the tab to a file, then resolution and frame rate settings, then auto-scroll and hotkeys.

A few more ideas on the same “start from an annoyance” principle:

  • An extension that pulls all the colors and fonts actually used on the open page into a ready list. Quick competitive research without digging through DevTools by hand.
  • A ruler extension: it measures the distance between two points on a live page in pixels. A quick alternative to manually redlining a competitor’s design.
  • An extension that downloads all images from a page at once at their original resolution. For collecting references and moodboards without hunting down every picture separately.

As with the Figma plugin, you don’t have to publish the extension to the Chrome Web Store. For personal use, install it locally in developer mode (chrome://extensions → Developer mode → Load unpacked) and just use it.

Carousels and frame-by-frame interactions

Another common request is a response to user actions rather than a static animation. A carousel you drag with your finger that springs back at the edges. Elements that come alive on scroll or on hover. Animation libraries (Motion, formerly Framer Motion, and GSAP, from the “Libraries and resources for vibe coding” topic) cover most of these scenarios, so you won’t have to write animation by hand from scratch. Codrops (same topic) is a good source of references for specific interactive effects. You can feed them straight to the agent as an example of the behavior you want.

When the result is off: change one parameter at a time

The general principle of targeted fixes from the “Vibe coding: websites” topic matters especially here. Generative effects almost never come out right on the first try: the right “character” of motion or composition is a matter of taste and fine-tuning, not a fact of “works / doesn’t work.” The practical difference from a regular interface is what exactly to change in one step:

  • One parameter at a time, not the whole generation. “Leave everything as it is, make the motion 30% slower” instead of “make it prettier.” Otherwise you can’t tell which change actually improved the result and which just swapped one random variation for another.
  • Lock randomness where there is any. If the generation uses a seed or a similar randomness parameter, fix its value while comparing variations. Then edits are predictable: only what you asked for changes, not everything all over again. What this looks like in pictures is shown in the “Image generation” topic, section “Core techniques”: with the same seed only the umbrella’s color changes; with a different one, the whole frame does.
  • Compare before and after side by side, not from memory. A screenshot or a short screen recording from before the edit, saved next to the result after it, is more reliable than your memory of “how it was.”

What to keep in mind: performance and graceful degradation

Generative graphics is the area of vibe coding with the biggest gap between “beautiful in the chat” and “lags on a phone.” A heavy WebGL effect that spins smoothly on a developer’s powerful computer can tank the frame rate or drain the battery on an average smartphone. Explicitly ask the agent not only to build the effect but also to test it on a weak device or add a simplified version for mobile. “Works on my machine” isn’t good enough as a definition of done.

Command examples for practice

Where to pasteWeb agent or terminal agent — in the project where the effect will live
Build an animated mesh gradient for the hero section background: palette #2D3047, #93B7BE, #FFCF56, slow organic flow without sharp transitions, no purple-blue default
Build a palette builder: the user enters one base color, the tool generates 4 harmonious pairs, and each can be copied as hex with a click
Add a product carousel that you drag with your finger on mobile and that springs back at the edges, and that’s controlled with arrows on desktop
This gradient flows too abruptly. Keep the palette and composition as they are, and slow the transition down by about a third
Add an FPS counter in the corner of the screen to this WebGL effect, and a lite mode behind a ?lite=1 flag in the URL: fewer particles, lower render resolution. Describe exactly what’s simplified

The agent can’t measure the frame rate itself; it will give you a guess. You’ll do the measuring: turn on CPU throttling in DevTools and compare normal and lite mode on the counter.

Mini-task

Build a small builder tool with one clear parameter: a gradient, pattern or palette generator. You need not an illustration but a working tool with a live preview that someone else can actually use. Set the palette and the character of motion explicitly in your prompt instead of relying on the model’s default. For another person to open the tool, they need a link. Publish the project on Vercel or Netlify; web agents like v0 and bolt.new give you a link right from their interface.

Time: 1.5–2 hours
Done when: another person opened the tool, played with a parameter and got a result without any explanation from you

Sources

  1. Plugin Manifestdevelopers.figma.com

    networkAccess and the list of allowed domains

  2. How Plugins Rundevelopers.figma.com

    a sandbox without DOM access, the UI in an iframe, message passing

  3. figma.clientStoragedevelopers.figma.com

    storing plugin data locally on the user’s computer

  4. Publish generative plugins to the Figma Communityhelp.figma.com

    plugins made by Figma agent can be published to the Community

  5. chrome.tabCapturedeveloper.chrome.com

    the tabCapture permission and recording through an offscreen document in MV3

  6. Hello World extensiondeveloper.chrome.com

    installing an extension locally with Load unpacked

Found a mistake or an outdated fact? Write to hey@iskra.guide