Skip to content
animorio
IT
All components

Incognito button

Buttons, Hover, TextGSAP, CSS onlyMediumCompressed weight: Demo 4.3 KBGSAP 28 KBFreeDownload the zip

The button that turns on private browsing in a browser or an app. Pressed, the dark leaves the disc and floods the pill, the disc turns on itself and a mask with glasses takes the place of the initials, the label scrambles letter by letter until it reads “Incognito is on” and a bar strikes through the eye on the right. Pressed again, everything goes back.

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>
<!--
  "Incognito button" 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>Incognito button</title>
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/mona-sans@5.3.0/wdth.css">
  <link rel="stylesheet" href="style.css">
</head>
<body>
  <main class="stage">
    <!-- the Incognito button of a browser or an app: the initials turn round into a mask, the dark spreads out
         of the disc, the label scrambles into its new words and a bar strikes through the eye -->
    <button class="ig" type="button" data-ig aria-pressed="false">
      <span class="ig__fill" data-fill aria-hidden="true"></span>
      <span class="ig__disc" data-disc aria-hidden="true">
        <b data-initials>NK</b>
        <svg data-mask viewBox="0 0 24 24"><path d="M3.500 9.500h17"></path><circle cx="8" cy="14.500" r="3"></circle><circle cx="16" cy="14.500" r="3"></circle><path d="M11 14.500q1-.900 2 0M6.500 9.500 8 5.500h8l1.500 4"></path></svg>
      </span>
      <span class="ig__label" data-label>Go incognito</span>
      <svg class="ig__eye" viewBox="0 0 24 24" aria-hidden="true">
        <path d="M2.500 12s3.500-6 9.500-6 9.500 6 9.500 6-3.500 6-9.500 6-9.500-6-9.500-6Z"></path>
        <circle cx="12" cy="12" r="2.600"></circle>
        <path class="ig__cut" data-cut pathLength="1" d="M4.500 4.500l15 15"></path>
        <path class="ig__slash" data-slash pathLength="1" d="M4.500 4.500l15 15"></path>
      </svg>
    </button>
    <span class="ig__say" data-say aria-live="polite"></span>

    <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.

10 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 “Incognito button” 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 light grey pill sixty pixels tall: the dark disc with the initials “NK”, the words “Go incognito” and an eye drawn in line. On press the black starts from the disc and widens in a circle until it covers the whole pill, text and icon turning white; the disc narrows to a thread and reopens white with a mask inside: a hat brim and two lenses. The label does not slide away: from left to right its letters become random letters for an instant and then the new ones, up to “Incognito is on”. Over the eye a bar draws diagonally, with a dark gap around it. One more press and the black goes back into the disc, the mask turns to initials, the bar withdraws and the letters scramble back.

How it works

The dark from the disc

Behind everything sits a circle in the night colour, centred on the disc and at scale zero: switched on, it grows until it covers the pill, which clips it to its own shape.

The disc that turns

The horizontal scale goes to zero, and in that frame initials and mask swap; then it comes back to one with a bounce. It reads as a coin turning, with no 3D.

The label that scrambles

A number goes from 0 to 1: letters before the point reached are already the new ones, the four just after are picked at random every frame, the rest is still the old label. Spaces stay spaces.

The bar with a gap

Over the eye the same line is drawn twice: a thick one in the background colour, which opens a gap, and over it the thin white one. They draw together with stroke-dashoffset.

Values to change

NameFileDefaultWhat it changes
NIGHTscript.js#17181cThe colour that floods the button when incognito is on.
INITIALSscript.jsNKThe initials of whoever is signed in, in the disc when incognito is off.
SCRAMBLEscript.js0.55How many seconds the label’s letters take to scramble.
STARTscript.jsfalsetrue = the button starts already in incognito.
LOOPscript.jstrueLeft alone, the demo’s pointer turns incognito on and after a while off.

Try them in the Playground

When to use it

In the account menu of a browser, a search or video app, an AI assistant with temporary chats; wherever the service can be used without leaving a trace in the history.

On phones

The same button, 244 by 60 pixels: it fits any screen, is easy on a thumb and both labels fit without wrapping.

With reduced motion

Colour, disc, label and bar change at once: no widening circle, no turn and no random letters. The demo does not move by itself.

Pitfalls

  • The button only changes the look: not saving history, cookies and searches is the app’s job. And “incognito” does not mean invisible: worth saying in a line beside it.
  • Random letters read badly to screen readers: the state is given by a separate aria-live region and aria-pressed, not by the changing label.
  • The font is not monospaced, so during the scramble the label’s width wobbles by a few pixels: it sits in a flexible space with the eye fixed on the right.
  • The text colour variables animate a little after the circle: if they change first, the white text passes over light grey for a moment and vanishes.
  • The mask is a line icon of our own, not any browser’s incognito logo.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

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

Testing

Tested on 21 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