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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@ui-annotate/react-vite

v0.1.4

Published

Annotate React UI issues in Vite apps and hand them off to coding agents.

Downloads

816

Readme

@ui-annotate/react-vite

Annotate React UI issues directly in a Vite dev server and hand the captured UI targets to a coding agent.

@ui-annotate/react-vite is a development-only Vite plugin for React apps. It injects inspector metadata, mounts the UI Annotate Runtime into your running page, lets you select real UI targets, records comments, and writes an agent-readable ui.annotate.json file.

Install

npm install -D @ui-annotate/react-vite

With pnpm:

pnpm add -D @ui-annotate/react-vite

Add the Vite plugin

import react from "@vitejs/plugin-react";
import { uiAnnotate } from "@ui-annotate/react-vite";
import { defineConfig } from "vite";

export default defineConfig({
  plugins: [
    react(),
    uiAnnotate()
  ]
});

Start your Vite dev server as usual:

npm run dev

The plugin only runs during Vite development. Production builds do not include the UI Annotate Runtime.

Use Annotate Mode

When the dev server page loads, UI Annotate adds a floating toolbar to the page.

  • Press D or click the toolbar Annotate button to enter annotate mode.
  • Hover the host page to highlight selectable UI targets.
  • Click a target to add it to the annotate task.
  • Add comments in the Annotate window.
  • Use Cmd/Ctrl + click on a target or trace node to open the source location in VS Code.
  • Use Cmd/Ctrl + S to save immediately.
  • Press Escape to leave annotate mode.

While annotate mode is active, UI Annotate intercepts host-page clicks, form submissions, drag starts, focus changes, and related interactions so selecting UI does not trigger real app behavior. When annotate mode is off, the host page works normally.

Agent Handoff

UI Annotate writes the selected targets and comments to ui.annotate.json in your project root.

After recording the UI issue, hand that file to your coding agent. A typical prompt is:

Read ui.annotate.json and update the referenced React UI according to the comments.

The task file is the handoff artifact. It records the selected UI targets, trace information, source locations, dimensions, style details, and user comments that the agent should use while editing the code.

Options

uiAnnotate({
  enabled: true,
  root: process.cwd()
});
  • enabled: Set to false to disable both inspector transforms and runtime injection.
  • root: Project root used for source paths and ui.annotate.json. Defaults to the Vite config root.

Runtime Boundaries

  • Supported host apps: React 18 or 19 with Vite 7 or 8.
  • The runtime is development-only and is injected by the Vite dev server.
  • The runtime creates #__ui_annotate_root__ under document.body; your app does not need to provide a mount point.
  • The UI is isolated in a shadow root.
  • Highlights and overlays are drawn outside the host app and do not directly mutate host DOM classes, styles, or structure.
  • Component trace depends on React Fiber plus inspector metadata injected by the plugin.
  • The package is for React + Vite apps; it is not a production feedback widget, Next.js plugin, or Webpack plugin.