Skip to content
animorio
IT
All components

Environment variables

Code, Text, HoverGSAP, CSS onlyMediumCompressed weight: Demo 7.6 KBGSAP 28 KBFreeDownload the zip

The environment variables editor of a hosting panel. Paste a .env block and each line lands as it was written, KEY=value; then the equals sign drops, the value crosses the row to its column on a spring and covers itself character by character. The eye uncovers a value for a few seconds, under a line that runs out; Copy copies it, Undo paste folds the rows away.

The code

A folder that runs on its own: index.html, style.css, script.js and the libraries from a CDN. The React and Vue tabs hold the same demo as a ready component, which switches its animations off when it leaves the page.

<!doctype html>
<!--
  "Environment variables" from Animorio · https://animorio.com
  License: free on your own sites and your clients’ sites, paid work included.
  Not for resale, redistribution, templates or code collections · https://animorio.com/en/license/
-->
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>Environment variables</title>
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/mona-sans@5.3.0/wdth.css">
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/jetbrains-mono@5.3.0/index.css">
  <link rel="stylesheet" href="style.css">
</head>
<body>
  <main class="stage">
    <!-- the environment variables editor of a hosting panel: a pasted .env block splits into rows, each value
         crosses to its column and masks itself character by character, the eye uncovers one for a few seconds -->
    <section class="ev" data-ev aria-label="Environment variables">
      <header class="ev__head">
        <div class="ev__title">
          <h2>Environment variables</h2>
          <p><span class="ev__count" data-count><b data-num>2</b></span> in <i>Production</i></p>
        </div>
        <button class="ev__paste" type="button" data-paste>
          <span class="ev__pasteicon" aria-hidden="true">
            <svg viewBox="0 0 16 16"><g data-clip><path d="M5.500 3h-1.200A1.300 1.300 0 0 0 3 4.300v8.400A1.300 1.300 0 0 0 4.300 14h7.400a1.300 1.300 0 0 0 1.300-1.300V4.300A1.300 1.300 0 0 0 11.700 3h-1.200"></path><path d="M6 2h4v2.400H6Z"></path></g><path class="ev__undo" data-undo d="M4.200 6.200h5.300a3 3 0 0 1 0 6H6.500M4.200 6.200l2.300-2.300M4.200 6.200l2.300 2.300"></path></svg>
          </span>
          <span class="ev__pastelabel" data-pastelabel>Paste .env</span>
        </button>
      </header>
      <ul class="ev__list" data-list></ul>
      <span class="ev__say" data-say aria-live="polite"></span>
    </section>

    <svg class="ghost" data-ghost viewBox="0 0 24 24" aria-hidden="true"><path d="M5 3.200 19.200 11l-6.300 1.600-3.300 5.900Z"></path></svg>
  </main>

  <script src="https://cdn.jsdelivr.net/npm/gsap@3.15.0/dist/gsap.min.js"></script>
  <script src="script.js"></script>
</body>
</html>

Playground

Change values, colours and text with the controls and watch the animation respond live. Or write in the code yourself. Then download the folder with your changes.

16 values to change

Works with Claude, Claude Code, ChatGPT, Cursor, VS Code, Windsurf, Codex, Gemini CLI

Or ask your AI assistant for it

With the Animorio connector, Claude Code, ChatGPT, Cursor or VS Code take it from here, guide included, and fit it into your project. Paste this request:

Take “Environment variables” from Animorio and fit it into my site
Platform licenseFree on your sites and your clients’ sites. Want it inside a website builder, a template platform or a client dashboard? There’s a license for agencies and platforms.

What it does

On white, a card with the title “Environment variables”, the count “2 in Production” and a black pill, “Paste .env”. Below, two rows: the name in monospace, the value covered by dots in a grey field, the struck-through eye and the copy button. Press the pill and three new rows arrive one after the other, still written as in the file, KEY=value, on a blue tint; the count rolls up to 5. After a moment the equals sign slips away, the value crosses the row and settles in its field with a small bounce, then its characters turn to dots from left to right and the eye and copy button appear. The eye loses its bar, turns blue and uncovers the value from the left; the field takes a blue edge and a thin line under the text shortens: when it runs out, the value covers itself again. Copy becomes a tick and the row flashes once. The pill, now “Undo paste”, folds the three rows away from the last to the first.

How it works

The line as it was written

Each row is born in the final grid, but the value is shifted with an x so it sits right after the equals sign: the distance is measured from the width of the name and of one character.

The value crosses

The equals sign fades as it drops, the value’s x goes back to zero on an elastic and the field’s ground appears under it.

Covering and uncovering

A number runs from zero to the value’s length: at each step the text is rewritten, as many dots as the number says and the rest in clear (or the reverse to uncover).

The time left

A line under the uncovered value goes from scaleX 1 to 0 over HIDE_AFTER seconds, linear; at the end it calls the function that covers it again.

Values to change

NameFileDefaultWhat it changes
ACCENTscript.js#3d5afeThe colour of the uncovered value, the tick and the tint of the pasted rows.
MASK_SPEEDscript.js0.45How many seconds a value takes to cover or uncover, character by character.
HIDE_AFTERscript.js3How many seconds a value stays uncovered before covering itself again.
SPRINGscript.js1How much the value bounces on its way to its column: 0.3 = a little, 2 = a lot.
LOOPscript.jstrueLeft alone, the demo’s pointer uncovers a value, copies it, pastes the block and undoes it.

Try them in the Playground

When to use it

In a project’s settings on a hosting platform, in a developer dashboard or in any form where several key and value pairs are pasted at once: secrets, headers, parameters.

On phones

The same card, 326 pixels wide at most: name, field and two 28-pixel buttons fit on one row even on a narrow screen, and long values fade out on the right instead of wrapping.

With reduced motion

Pasted rows appear already split and covered; the eye swaps dots and text at once and covers it again after a few seconds; no bounces and no folding rows. The demo does not move by itself.

Pitfalls

  • Names, addresses and keys are made up (example.com is reserved for examples). In a real panel secrets never come back to the browser once saved: the eye only works while the value has just been typed, or asks for the password again.
  • Pasted text goes into the page with textContent only, never as HTML, and only lines written KEY=value are accepted.
  • The dots must be as wide as the letters, or the value grows and shrinks as it covers: a monospace typeface is needed.
  • Copying to the clipboard works only on a secure page and after a real gesture: the demo does it only on a person’s click.
  • The value moves with a GSAP x on its container: the field, the edge and the time line are children, so the CSS is not wiped out.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0, JetBrains Mono (font variabile) 5.3.0.

Compressed with gzip, the three demo files weigh 7.6 KB; the libraries: GSAP 28 KB.

Testing

Tested on 22 November 2026

  • Desktop: Done
  • Phone: Done
  • Reduced motion: Done
  • Safari on iPhone: To do

License

Use it in your own projects and in your clients’ projects. Do not resell it or redistribute it as is. GSAP stays under its own Standard license. Full license.

All components