How to add an animated effect to your website with an AI prompt
ยท 5 min read
A step-by-step with the Aurora background, one of the catalog effects: pick it, adjust the colors, copy the prompt, paste it into your AI tool and check the result before you publish.
What you are going to do
You will take a ready-made effect, copy its prompt and paste it into the AI tool that already edits your site. The example is the Aurora background: blurred patches of light that drift slowly behind a headline. It suits a class, a therapy practice, a course or an app, any page that wants a calm mood.
You need two things: a website (plain HTML, React or Next) and an AI tool that edits code, such as Claude Code, Cursor, Codex, Lovable, Bolt or v0. A regular chat works too, as long as you put the code into the project yourself.
I picked Aurora because it is pure CSS. The file injects a stylesheet and animates a layer behind the element. There is no canvas and no library, so there is little that can go wrong.
1. Pick the effect
Open the effects gallery. Effects are grouped by category: Backgrounds, Text, Buttons, Cards, Mouse and more. Aurora is under Backgrounds. Click its card and the effect page opens with the effect running live.
2. Adjust the colors before you copy
The Adjustments panel has five controls: Color 1, Color 2, Color 3, Background and Time. Change them and the result updates right away. Whatever you pick goes into the prompt, so the AI already receives your colors.
- Colors: use your brand colors. For a background behind text, prefer a dark Background and patches that do not get too bright.
- Time: the length of one cycle, 14 seconds by default. A bigger number means slower movement. On a page people read, 20 seconds or more keeps the motion discreet.
3. Copy the prompt
The Copy prompt button copies the ready-made text. The arrow next to it opens a menu with other options: copy only the code, or get a prompt tuned for Claude Code, Cursor, Codex, Lovable, Bolt or v0. The first three talk about project files. The last three are meant for chat and also include a React component that loads the script.
To copy, the page asks you to sign in. The first 3 prompts, effect or template, are free, and the line under the button tells you when a copy will use one of them.
Every prompt follows the same order:
- One sentence saying what you want:
Quero adicionar o efeito "Fundo aurora" (aurora background) ao meu site, em JavaScript puro, sem React e sem instalar nada.The prompt text is in Portuguese on the English site too. The tools read it fine, and you can add your own instructions in English. - What the effect does, in one sentence.
- Step 1: create the file
efeitos/aurora.jswith the full code, without changing the logic. - Step 2: load the file at the end of
<body>. - Step 3: mark the element with
data-efeito="aurora". - Step 4: adapt the colors to your site through the CSS variables, keep respecting
prefers-reduced-motionand add no dependencies.
Because the code travels inside the prompt, the AI does not have to invent the effect. It copies the file and connects it to your element.
4. Paste it and say where
Paste the prompt and add an instruction about the place. The more concrete, the better. For example:
Put the effect behind the main section of the home page,
the one with the headline and the book-a-class button.
Keep the texts and the layout as they are.
When the AI finishes, your HTML should look something like this:
<section class="hero" data-efeito="aurora"
style="--aurora-1:#7fe0b0; --aurora-2:#1f8f78; --aurora-3:#bfe8d0;
--aurora-fundo:#08231f; --aurora-tempo:20s">
<h1>Yoga class before work</h1>
...
</section>
<script src="efeitos/aurora.js"></script>
In React or Next, Aurora is easier than most effects. Since it is only CSS applied to the attribute, the script just has to be loaded and the element needs data-efeito, even if the element appears later. Effects that draw on a canvas must be started inside useEffect, and the chat prompts already bring that component ready.
5. Check before you publish
- Does the background show up and move? If you only see a flat color, open the browser console and the Network tab. A 404 on
efeitos/aurora.jsmeans a wrong path. - Is the text still readable? The patches pass through different places during the cycle. Wait a few seconds and look again. On the example page a light patch rises in the bottom middle of the screen, away from the text, which is why it works.
- On a phone? Open it at 390 px wide and check that the headline breaks well and the button fits.
- With reduced motion? In Chrome, open developer tools, the “More tools” menu, “Rendering”, and turn on the
prefers-reduced-motionemulation. Aurora stops, with no animation. - Console clean? No red warning should appear.
If something goes wrong
| What you see | Likely cause | What to ask the AI |
|---|---|---|
| Flat color only | The script did not load, or the attribute is not on the element | “efeitos/aurora.js returns 404. Fix the script path.” |
| Background vanishes behind an area | A block on top has an opaque background | “Remove the opaque background from the headline block and let Aurora show.” |
| Text is hard to read | Light patches pass behind it | “Darken --aurora-fundo and --aurora-1 until the white text has enough contrast.” |
| The motion draws too much attention | Short cycle | “Set --aurora-tempo to 24s.” |
Where to go next
The method is the same for any effect: pick, adjust, copy, paste and check. If you want a whole page instead of one piece, the website templates follow the same idea, and the next post shows it with a barbershop landing page with WhatsApp booking. If your question is performance and accessibility, read how to keep animation light and accessible.
The first 3 prompts are free. You can try Aurora on your site today.
Open Aurora in the gallery