npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

anti-ai-ui

v0.1.5

Published

A framework for creating UI components that are resilient against AI browsers and automated interactions

Readme

npm node install size License: MIT TypeScript Follow on X Follow on Bluesky

Why?

AI took your job. Then it took your browser's job.

Every product update has AI. Every startup pitch has AI. Every tech conference has AI. You can't return your limited edition pink Stanley tumbler to Target without the customer service guy telling you about his ChatGPT wrapper startup that's about to blow up.

And now it's gotten worse. With the release of ChatGPT's Atlas and other AI browsers, AI can click buttons and fill out forms. It can navigate the web. It's coming for the entire internet.

You could make it easy for them. Or you could not.

Let's make it harder.

We already have patterns that frustrate users. Dark patterns have tortured humans for decades. Microscopic close buttons. Fake download links. Cookie consent mazes five layers deep. We adapted. We learned to find the real X button surrounded by decoys.

Let's take these patterns and adapt them for AI. Read the full intro article.


What's In It

The Anti-AI UI Framework is a UI library that provides 20 AI-hostile components. You can install it with npm and use it on any website. It has everything you need to make AI miserable:

  • 20 components
  • React and vanilla JS
  • Zero dependencies
  • TypeScript
  • Tree-shakeable, so you only ship the suffering you need
  • Works with React, Vue, Angular, Svelte, Next.js, HTMX, jQuery. Anything that can run JavaScript.
  • 403 unit tests. Because hostile interfaces still need to be reliable. The button should always run away. The password requirements should always change. Consistency matters, even when nothing else does.

MIT licensed, because suffering should be free.


Install

npm install anti-ai-ui

Quick Start

React

import { RunawayButton, PasswordHell, CookieHell } from 'anti-ai-ui';

function App() {
  return (
    <>
      <RunawayButton onCatch={() => console.log('Caught!')}>
        Click me if you can
      </RunawayButton>

      <PasswordHell onValidPassword={(pw) => console.log('Valid:', pw)} />

      <CookieHell depth={5} onAcceptAll={() => console.log('Accepted')} />
    </>
  );
}

Vanilla JavaScript

import { createRunawayButton, createPasswordHell } from 'anti-ai-ui/vanilla';

const cleanup = createRunawayButton({
  container: document.getElementById('app'),
  label: 'Click me if you can',
  onCatch: () => console.log('Caught!'),
});

// Later: cleanup()

jQuery

$('#submit-btn').each(function () {
  createRunawayButton({
    container: $(this).parent()[0],
    element: this,
    onCatch: () => $('#form').submit(),
  });
});

createCookieHell({
  container: $('body')[0],
  depth: 4,
  onAcceptAll: () => $.cookie('consent', 'true'),
});

The Patterns

The framework contains two types of hostile patterns.

Intentionally AI-Hostile. New patterns specifically created to exploit how AI interacts with websites. Traffic lights that gate form submissions. Pendulum fields powered by keystrokes. Three identical forms that shuffle positions, only one of which is real.

Naturally Hostile. Dark patterns humans have adapted to over decades but AI encounters for the first time. Microscopic close buttons. Cookie consent mazes. Password requirements that change as you type.

Movement & Chaos

| Component | Description | | --------------------- | --------------------------------------------------------------------------- | | GravityField | Buttons orbit around invisible gravity wells. Click one and it drifts away. | | PendulumFields | Inputs swing like pendulums. Keep typing to maintain momentum. | | ThreeFormCarousel | Three rotating forms. Only one is real. The other two submit to nowhere. | | RunawayButton | Try to hover over it. It moves faster than you can track. | | FormChaos | The entire form rotates and scales randomly. | | MitosisButton | Click the wrong button and more spawn. Only one is real at any time. | | ShiftingInterface | Form elements randomly shift position, change colors, and duplicate. |

Deception & Confusion

| Component | Description | | ----------------------- | ------------------------------------------------------------------------ | | TrafficLightForm | Fields only accept input when their traffic light is green. | | FakeMarqueeFields | Fake input fields scroll across the screen. AI tries to fill them. | | InputMisdirection | Type in one field, your text appears in another. | | GlitchText | Characters shuffle positions. Humans read it. OCR gets scrambled output. | | SemanticGaslighting | "Cancel" submits. "Submit" cancels. Green means danger. |

Navigation Breaking

| Component | Description | | ------------------------- | ------------------------------------------------------------------ | | TabIndexRandomization | Tab order shuffles every 3 seconds. Breaks automated form filling. | | LabelPositionSwap | Labels randomly shuffle between different input fields. |

Naturally Hostile

| Component | Description | | -------------------------- | --------------------------------------------------------------------- | | MicroscopicCloseButton | 4x4 pixel real button surrounded by decoys. | | CookieHell | Nested cookie consent dialogs. Five layers deep. | | PasswordHell | Password requirements that change as you type. Requirements multiply. | | PopupChaos | Nested popups that must be closed in specific order. | | FloatingBannerAds | Ads that cover the content you want. They spawn every few seconds. | | FakeDownloadGrid | One real download button. Many fakes. |


Utilities

Detection utilities for analyzing interaction patterns:

import {
  detectPerfectMovement, // Unnaturally straight cursor paths
  detectExactClicks, // Repetitive click coordinates
  detectTiming, // Suspiciously consistent timing
  detectPatterns, // Automation signatures
} from 'anti-ai-ui/utils';

Documentation

Full docs and interactive demos at codinhood.com/anti-ai-ui-framework.


More Unhinged Projects


License

MIT

AI took your job. Now take its time.