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

rad-gui

v0.11.1

Published

A simple, feature-rich, and easy-to-use GUI library for better visibility into data intensive applications.

Readme

RAD-GUI 🎮

✨ Features

  • Lightweight & Fast: Designed for performance with minimal dependencies
  • Modern API: Clean, chainable interface for building controls
  • Responsive: Works across desktop and mobile devices
  • Highly Customizable: Easily themed with CSS variables
  • Compatible: Inspired by and compatible with lil-gui and dat-gui as a drop-in replacement
  • Fully Typed: Written in TypeScript with complete type definitions
  • AI-Ready: Includes LLM-optimized codebase reference for AI assistants and agents

📦 Installation

# Using npm
npm install rad-gui

# Using yarn
yarn add rad-gui

🚀 Quick Start

JavaScript

import { GUI } from 'rad-gui';
import 'rad-gui/lib/rad-gui.css';

// Create a GUI instance
const gui = new GUI();
const params = { x: 0, y: 0, color: '#ff0000' };

gui.add(params, 'x', 0, 100);
gui.addColor(params, 'color');

TypeScript

import { GUI, ControlEventData } from 'rad-gui';
import 'rad-gui/lib/rad-gui.css';

interface DemoParams {
  x: number;
  y: number;
  color: string;
  enabled: boolean;
}

const gui = new GUI({ title: 'Controls', width: 300 });
const params: DemoParams = { x: 0, y: 0, color: '#ff0000', enabled: true };

// Full type safety and IntelliSense support
gui.add(params, 'x', 0, 100)
  .onChange((data: ControlEventData<number>) => {
    console.log(`X changed to ${data.value}`);
  });

gui.addColor(params, 'color');
gui.add(params, 'enabled');

For a complete example, see our TypeScript Example which demonstrates all features with proper typing.

📚 Documentation

RAD-GUI provides comprehensive type definitions and IntelliSense support for TypeScript projects. The library includes:

  • Complete type definitions for all controls and options
  • Proper event callback typing with structured data
  • Generic overloads for type-safe parameter handling
  • Interface definitions for configuration objects

📋 API Reference

Creating a GUI

// Basic GUI creation
const gui = new GUI();

// With options
const gui = new GUI({
  title: 'My Controls',
  width: 300,
  autoPlace: false,
  closeFolders: true
});

Adding Controls

// Auto-detected control types
gui.add(object, 'numberProperty');     // → NumberControl
gui.add(object, 'booleanProperty');    // → ToggleControl  
gui.add(object, 'stringProperty');     // → TextControl
gui.add(object, 'functionProperty');   // → FunctionControl

// Explicit control types
gui.add(object, 'number', 0, 100, 1);           // NumberControl with range
gui.add(object, 'option', ['A', 'B', 'C']);     // OptionControl
gui.addColor(object, 'color');                  // ColorControl

Event Handling

// Individual control events
gui.add(params, 'value')
  .onChange((data: ControlEventData) => {
    console.log(`${data.property} changed to ${data.value}`);
  })
  .onFinishChange((data: ControlEventData) => {
    console.log('Finished changing:', data);
  });

// Global GUI events  
gui.onChange((data: ControlEventData) => {
  // Called for any control change
});

gui.onOpenClose((gui: GUI) => {
  // Called when folders open/close
});
  doSomething() { 
    console.log('Button clicked!');
  }
};

// Add controls
gui.addColor(params, 'color').name('Color');
gui.add(params, 'x', 0, 100).name('X Position');
gui.add(params, 'y', 0, 100).name('Y Position');
gui.add(params, 'enabled').name('Enabled');
gui.add(params, 'option', ['A', 'B', 'C']).name('Option');
gui.add(params, 'doSomething').name('Run Action');

// Create a folder for grouped controls
const folder = gui.addFolder('Advanced Settings');
folder.add(params, 'x').step(5).name('X (Step 5)');

Previews

📚 Documentation

For API details and reference information, visit the API Reference.

🤖 For AI Assistants and Tools

This project includes a .llm.reference.md file specifically designed for AI assistants, agents, and tools to better understand and work with the codebase. This file contains:

  • Comprehensive architecture overview
  • Key component descriptions
  • Usage patterns and code examples
  • Core utility functions

AI tools can reference this file to provide more accurate and helpful suggestions when working with rad-gui.

📋 Available Controls

RAD-GUI supports various control types based on the parameter's value and provided options:

| Type | Description | Example | |------|-------------|---------| | Number | Slider or text input for numbers | gui.add(params, 'x', 0, 100) | | Boolean | Checkbox for true/false values | gui.add(params, 'visible') | | String | Text input field | gui.add(params, 'name') | | Function | Button that calls a function | gui.add(params, 'save') | | Color | Color picker | gui.addColor(params, 'color') | | Options | Dropdown for selecting from options | gui.add(params, 'size', ['S', 'M', 'L']) |

🎨 Customization

RAD-GUI is easily styled using CSS variables:

// Create and apply a custom theme
const darkTheme = {
  '--background-color': '#1a1a1a',
  '--text-color': '#e0e0e0',
  '--title-background-color': '#272727',
  '--title-text-color': '#ffffff',
  '--widget-color': '#2c2c2c',
  '--hover-color': '#3c3c3c',
  '--focus-color': '#444444',
  '--number-color': '#2cc9ff',
  '--string-color': '#a2db3c'
};

// Apply theme to a specific GUI instance
Object.entries(darkTheme).forEach(([key, value]) => {
  gui.domElement.style.setProperty(key, value);
});

📝 Examples

Explore more examples in the examples directory:

🧪 Development

# Install dependencies
npm install

# Build development version
npm run build:dev

# Run tests
npm run test

# View demo
npm run local:kitchen-sink