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

retro-web-terminal

v0.2.0

Published

An embeddable React terminal with GPU-rendered CRT effects

Readme

retro-web-terminal

An embeddable React terminal with GPU-rendered CRT effects, built on xterm.js and WebGL2. Includes Amber, Green Phosphor, and Color CRT presets with individually configurable glow, scanlines, curvature, phosphor trails, color separation, noise, flicker, glitches, and vignette.

Install

Install from npm in your React 18+ app:

pnpm add retro-web-terminal

Usage

import { useRef } from 'react'
import { RetroTerminal, type RetroTerminalHandle } from 'retro-web-terminal'
import 'retro-web-terminal/styles.css'

export function Example() {
  const terminal = useRef<RetroTerminalHandle>(null)

  return (
    <RetroTerminal
      ref={terminal}
      theme='amber'
      style={{ height: 420 }}
      settings={{ glow: { intensity: 0.4 } }}
      onReady={(handle) => handle.write('Hello, future\r\n')}
      onData={(data) => terminal.current?.write(data)}
    />
  )
}

Provide a height and import the CSS once. This example echoes input; connect onData, onResize, and the ref's write() to your own runtime or terminal transport for a real session. Use a client component in server-rendered frameworks.

The ref exposes write(string | Uint8Array, callback?), focus(), clear(), getSize(), and getSelection(). onReady can return a cleanup function. onRendererChange reports webgl or fallback. Theme/settings changes preserve output.

Settings use explicit TypeScript types and JSON presets. RetroSettings describes a complete configuration; RetroSettingsInput describes nested overrides. resolveSettings(theme, overrides) merges overrides into fresh nested objects. themes and parameterRanges are also exported; ranges are advisory bounds for controls. Values are not validated or clamped at runtime, so validate any untrusted configuration in your app.

settingsSchema has been removed. Replace schema-derived types with RetroSettings or RetroSettingsInput imports, and use resolveSettings to merge defaults:

import { resolveSettings, type RetroSettingsInput } from 'retro-web-terminal'

const overrides: RetroSettingsInput = { glow: { intensity: 0.4 } }
const settings = resolveSettings('amber', overrides)

Current desktop browsers are the target. WebGL2 failure falls back to xterm's ordinary renderer with the same session. Reduced motion suppresses animated noise, flicker, and glitches. Extreme settings can compromise pointer alignment. Font loading is left to the host; IBM Plex Mono is preferred when available, followed by system monospace fonts.

The browser shell, DialKit controls, fonts, and monitor artwork are separate demo assets. Repository, demo instructions, and validation.

MIT. Original CRT shaders inspired by cool-retro-term.