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

uilint-react

v0.2.23

Published

React component for AI-powered UI consistency checking

Downloads

8,613

Readme

uilint-react

React component for AI-powered UI consistency checking in running applications.

Overview

uilint-react provides the <uilint-devtools> web component that enables element inspection and LLM-powered code analysis in your React/Next.js application.

Installation

npm install uilint-react uilint-core

Or use the CLI to install everything automatically:

npx uilint install

Usage in a Running App

Add the devtools web component to your app:

Next.js Setup

// app/layout.tsx
import "uilint-react/devtools";

export default function RootLayout({ children }) {
  return (
    <html>
      <body>
        {children}
        <uilint-devtools />
      </body>
    </html>
  );
}

Vite Setup

// src/main.tsx
import "uilint-react/devtools";
import { createRoot } from "react-dom/client";
import App from "./App";

createRoot(document.getElementById("root")!).render(
  <>
    <App />
    <uilint-devtools />
  </>
);

Features

  • Alt+Click on any element to open the inspector sidebar
  • View component source location and file path
  • Navigate through the component stack (scroll while holding Alt)
  • Open in Cursor - jump directly to the source file
  • Scan with LLM - analyze the component for style issues
  • Copy fix prompt - paste into Cursor agent for automatic fixes

Web Component Attributes

| Attribute | Type | Default | Description | | ---------- | --------- | --------------- | ------------------------------------- | | enabled | string | "true" | Enable/disable UILint ("true"/"false")| | position | string | "bottom-left" | Toolbar position | | theme | string | "system" | Theme ("light", "dark", "system") |

API Routes

The CLI installs these routes automatically, or you can add them manually:

// app/api/.uilint/analyze/route.ts
// Handles LLM analysis of source code

// app/api/.uilint/source/route.ts
// Dev-only route for fetching source files

Usage in Tests

UILint can run in Vitest/Jest tests with JSDOM:

Direct JSDOM Adapter

import { JSDOMAdapter, runUILintInTest } from "uilint-react/node";
import { render } from "@testing-library/react";

test("detect style inconsistencies", async () => {
  render(<MyComponent />);

  // Run UILint and get issues
  const issues = await runUILintInTest(document.body);

  // Assert on specific issues
  expect(issues).toHaveLength(0); // Fail if any issues found
});

test("custom adapter usage", async () => {
  render(<MyComponent />);

  const adapter = new JSDOMAdapter(".uilint/styleguide.md");
  await adapter.loadStyleGuide();

  const result = await adapter.analyze(document.body);
  adapter.outputWarnings(result.issues);

  expect(result.issues.filter((i) => i.type === "color")).toHaveLength(0);
});

API

Zustand Store (Direct Access)

For advanced use cases, you can access the UILint state directly via the Zustand store:

import { useUILintStore } from "uilint-react";

function MyComponent() {
  const settings = useUILintStore((s) => s.settings);
  const inspectedElement = useUILintStore((s) => s.inspectedElement);
  // ... use store state
}

JSDOM Adapter (Node.js)

// Import from "uilint-react/node" for test environments
class JSDOMAdapter {
  constructor(styleGuidePath?: string);

  loadStyleGuide(): Promise<void>;
  analyze(element: Element): Promise<{ issues: Issue[] }>;
  outputWarnings(issues: Issue[]): void;
}

function runUILintInTest(element: Element): Promise<Issue[]>;

Prerequisites

For LLM-powered features, you need Ollama installed locally:

# Install Ollama, then pull the default model
ollama pull qwen3-coder:30b

Related Packages

Documentation

For full documentation, visit the UILint GitHub repository.

License

MIT