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

@ditherweb/ui

v0.1.0

Published

A modern React UI framework inspired by early-Internet and classic desktop computing visual language.

Readme

@ditherweb/ui

Retro appearance. Modern engineering.

@ditherweb/ui is a comprehensive React component library inspired by the visual language of the early Internet, classic desktop workstations, and retro computing aesthetics—built with modern TypeScript, Tailwind CSS, accessible interaction primitives, and full React Server Component (RSC) compatibility.


Features

  • 🕹️ 96 Distinct Primitives: Buttons, dialogs, retro window chrome, taskbars, CRT monitors, halftone filters, marquee scrollers, guestbooks, visitor counters, and more.
  • ⚡ Modern React & RSC Ready: Fully compatible with React 18 and React 19. Interactive components retain "use client"; directives while foundational layout and typography primitives run as React Server Components.
  • 🎨 OKLCH Design Tokens: Authentic retro color palettes, hard bevels, stepped drop-shadows, and procedural dither patterns distributed via lightweight CSS.
  • 🌲 Tree-Shakeable: Clean ESM exports with granular "sideEffects": ["**/*.css"] annotations ensure unused components are purged from production bundles.
  • 🔍 Full Source Maps: Bundled with inlined sources for seamless debugging and IDE navigation.

Installation

Install @ditherweb/ui along with required peer dependencies:

npm install @ditherweb/ui react react-dom

Stylesheet Setup

Import the Ditherweb stylesheet once in your application root layout or main entry point:

In JavaScript / TypeScript:

// app/layout.tsx (Next.js) or src/main.tsx (Vite)
import "@ditherweb/ui/styles";

In CSS:

/* src/styles.css or app/globals.css */
@import "@ditherweb/ui/styles";

The distributed stylesheet includes all foundational design tokens, retro bevel variables, procedural dither SVGs, and base utility classes. You can also import specific style sheets individually if needed:

@import "@ditherweb/ui/styles/tokens.css";
@import "@ditherweb/ui/styles/primitives.css";

Supported Environments

@ditherweb/ui targets modern bundler-driven workflows:

  • Next.js: 15+, 16+ (App Router with Turbopack or Webpack)
  • Vite: 5+, 6+ (React plugin with Rollup / esbuild)
  • Webpack: 5+
  • TypeScript: moduleResolution: "bundler" (recommended) or "node10"

[!NOTE] The library distributes standard ESM modules with extensionless relative specifiers designed for bundlers. If you are using TypeScript, ensure your tsconfig.json specifies "moduleResolution": "bundler" (or enable "skipLibCheck": true). Direct consumption in unbundled Node.js native ESM (node16/nodenext without a bundler) requires a module loader that resolves extensionless specifiers.


Usage Examples

1. Retro Buttons & Badges

import { Button, Badge } from "@ditherweb/ui";

export function ActionPanel() {
  return (
    <div className="flex items-center gap-3">
      <Button variant="default">Save Document</Button>
      <Button variant="outline">Cancel</Button>
      <Badge variant="retro">v1.0.0</Badge>
    </div>
  );
}

2. Desktop Window with Titlebar & Controls

import { Window, WindowTitleBar, WindowTitle, WindowControls, Well } from "@ditherweb/ui";

export function SystemMonitor() {
  return (
    <Window className="w-96">
      <WindowTitleBar>
        <WindowTitle>SYSTEM.EXE</WindowTitle>
        <WindowControls onMinimize={() => {}} onClose={() => {}} />
      </WindowTitleBar>
      <div className="p-4 space-y-3">
        <Well className="p-3 font-mono text-sm">
          MEM: 640K OK<br />
          CPU: 66 MHz
        </Well>
      </div>
    </Window>
  );
}

3. Visual Effects (CRT & Dither)

import { CRT, Dither } from "@ditherweb/ui";

export function RetroHero() {
  return (
    <CRT scanlines flicker glow phosphor="amber">
      <Dither pattern="bayer" intensity="medium">
        <div className="p-8 text-center">
          <h1 className="text-3xl font-bold">WELCOME TO CYBERSPACE</h1>
        </div>
      </Dither>
    </CRT>
  );
}

Next.js App Router (RSC) Support

@ditherweb/ui is architected for React Server Components:

  • Server-Safe Components: Primitives like Button, Card, Badge, Heading, Text, and Container do not emit "use client"; and run directly on the server without client bundle overhead.
  • Client Components: Interactive primitives requiring browser state (e.g., Dialog, DropdownMenu, Tabs, Accordion, ContextMenu, Tooltip, Taskbar) automatically include "use client"; directives at line 1.
  • You can freely compose server and client components in your Next.js application without manual "use client" wrappers.

Accessibility & Keyboard Navigation

  • WAI-ARIA Compliance: Dialogs, dropdowns, menus, and popovers follow standard WAI-ARIA authoring practices, including proper focus management, keyboard navigation (Tab, Arrow keys, Enter, Space, Escape), and aria-* roles.
  • High-Contrast Indicators: Focus rings use high-contrast retro borders with custom outline offsets to ensure visual clarity under WCAG 2.1 AA standards.
  • Semantic Structure: All components render semantic HTML elements by default with support for polymorphic composition (asChild or as props).

Testing & Quality Assurance

@ditherweb/ui includes end-to-end automated verification suites to guarantee cross-framework stability, clean tree-shaking, and type definition integrity:

  • Cross-Framework Consumer Suite: Validates tarball packaging, source maps, client directives, and zero-error builds across React 18, React 19, Vite, and Next.js 16 App Router (RSC).
    npm run test:consumer
  • Documentation Snippet Verification: Automatically extracts and compiles all 96 component documentation usage snippets and README code blocks against the package declarations with tsc --noEmit.
    npm run verify:snippets

License

MIT © 2026 Ditherweb Contributors