Back to DocsYou are on Bot.

PrequelUI Bot

A development-only overlay that lives in the corner of your own page.

Outside an explicit scoped demo, the bot never runs in production. It mounts a mascot in a Shadow DOM, lets you click an element on your page, classifies it locally, and proposes exactly three motions from the registry. Hovering a proposal plays it on the real element with the Web Animations API.

Install

Load the script only in development. Without data-prequel-bot="dev", on a public host, or after <meta name="prequel-bot" content="off">, the script stops silently.

index.html
<script src="/bot/v2.js" data-prequel-bot="dev" defer></script>

A public host stays blocked unless you opt into a demo with force, demo and a CSS scope. In that mode only the descendants of the scope are selectable, the mascot docks inside it, and a discreet Demo badge marks the overlay. Everywhere else the guard still refuses to mount.

scoped demo
<script
  src="/bot/v2.js"
  data-prequel-bot="dev"
  data-config='{"force":true,"demo":true,"scope":"#playground"}'
  defer
></script>
dev-bot.tsx
import { PrequelBot } from "@prequelui/bot/react";

export function DevBot() {
  if (process.env.NODE_ENV === "production") return null;
  return <PrequelBot framework="react" />;
}

The flow

  1. 1. Arm. Click the mascot or press the shortcut. The cursor becomes a crosshair and the page is described under the pointer.
  2. 2. Pick. Move with the pointer or Tab and arrows. The outline, the chip and the breadcrumb follow the target.
  3. 3. Compare. The panel shows three motions: one recommended, one expressive, one sober alternative. Each card names the registry component that provides the movement.
  4. 4. Tune. Duration, spring stiffness and damping, intensity, distance, scale and loop. The code output follows the same values.
  5. 5. Use. The motion is copied as code for React, Vue, Svelte, Solid or JavaScript. The install tab gives the exact shadcn command.

Live preview

Every preview is interruptible. Switching cards, closing the panel, pressing Escape, navigating or losing the tab cancels the animation and restores the element exactly. Text recipes save the original child nodes; numeric recipes save the original text. prefers-reduced-motion removes translation, rotation and scale, and refuses the motions that cannot be softened.

Code, install, agent

The code tab emits a small, self-contained snippet for the selected framework. The install tab reuses the registry rules: primitives exist for five frameworks, effects and text components are React-only and show a clear note. The agent tab either sends a structured request to the local bridge on 127.0.0.1, or copies a prompt that calls the PrequelUI MCP server.

bridge
npx @prequelui/bot-bridge --port 4318
# PrequelUI Bot bridge
# Local only · 127.0.0.1
# Pairing code: 482 913

Keyboard

Alt + Shift + A
Arm the picker from anywhere
Enter / Space
Arm the picker on the mascot
Tab / Shift + Tab
Move between interactive targets
Arrows
Parent, first child, previous or next sibling
Enter
Select the target
P
Read the target description
O
Open the page outline
Escape
Stop the preview, close the panel, disarm

Privacy

The catalogue is embedded, there is no telemetry and no cookie. The overlay never reads the value of an input, a textarea or a select, never captures the page and never sends the DOM anywhere. The optional bridge binds to 127.0.0.1 only and keeps a 15-minute token in memory.

See the MCP guide for the agent side, or try the live playground.

Built by Vidhal. The source is available on GitHub.

MIT licensed