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

swing-ui

v1.1.1

Published

Cross-platform Graphic User Interface for Node.js, Bun and Deno 2+

Readme

swing-ui GUI Module

Build real cross-platform desktop apps in JavaScript — no Electron, no Chromium, no browser, no HTML/CSS, no React/Angular/Svelte/Vue. No back-end / front-end mess.

Build once, run it on Windows, Linux and macOS in your favorite JavaScript runtime: Node.js, Bun, or Deno 2+.

npm version Node | Bun | Deno Windows | macOS | Linux npm license

swing-ui brings a new experience to Java Swing with enhanced components and a simple JavaScript API, allowing you to build native-looking, cross-platform desktop applications entirely in JavaScript using the JS runtime you already know: Node.js, Bun, or Deno 2+.

You only write JavaScript and the GUI gets built, or better yet, use our Visual GUI Designer to skip coding at all.

Try it in your project: npm install swing-ui.

For quick onboarding check out swing-ui.com Getting Started guide and API reference.


Finally, JavaScript is no longer for web browser and server back end. Now its for desktop apps too.

Problems with building JavaScript desktop apps without swing-ui

If you've shipped a desktop app in JS before, you've probably lived one of these:

  • Electron works, but it's heavy, require HTML, CSS, .... Every app ships its own copy of Chromium and Node, so installers balloon past 100–150 MB and even simple apps chew through RAM before you've drawn a single window.
  • The "lightweight" alternatives mean leaving JavaScript. Native performance and a small footprint usually mean learning Qt, WinForms, or raw Swing/AWT in a completely different language and ecosystem.
  • HTML/CSS UIs never quite feel native. Buttons, menus, and dialogs built in a webview look and behave like a webpage wearing a desktop costume, not a real OS application.
  • Back-end/front-end confusion and management makes coding horrible. Now it's just one JavaScript code like it should be.
  • Asynchronous request calls to UI components from main application logic are messy. swing-ui provides a synchronous deterministic code execution, so that when you request a text from a component in your main application logic code, you can use the returned text in your next line of code without using await, Promise and a callback function.

swing-ui removes those issues. You get a real native OS windows and UI components from enhanced Java Swing library and you don't have to write a single line of Java code, HTML or CSS. Write your UI in plain JavaScript, or simply design the UI in our free swing-ui Visual GUI Designer.

swing-ui under the hood


Why developers love swing-ui GUI module

  • No browser engine, no markup. No Chromium bundled into your build, no HTML, no CSS — just JavaScript, or the visual GUI Designer if you'd rather not hand-position pixels.

  • It's just JavaScript, with a chainable API. Every component returns itself, so building UI reads like jQuery, not like fighting a framework:

    const saveButton = new Button("Save").position(15, 50).size(100, 30)
      .addTo(window)
      .onAction(e => save());
  • JavaScript API is super easy, intuitive, and well documented. Quick onboarding docs and API reference is at swing-ui.com.

  • Simple synchronous code execution. No need to use await or callback function to get Ui component property or value.

  • For your convenience complex low level stuff is highly simplified without much compromise. For example features like drag-and-drop, undo/redo, clipboard management, table manipulation, images support and much more.

  • Looks native, not just close. swing-ui can opt into your OS's system look-and-feel, so windows and controls take on native Windows, macOS, or Linux styling instead of a generic default theme.

  • The full Java Swing component library, from JS. Tables with sorting, filtering, column reordering and hiding; trees, tabs, and split views; rich clipboard and drag-and-drop support — including MIME types, both within your app and to/from other applications; full icon and image support across JPG, PNG, GIF, BMP, ICO, TIFF, HEIC, WEBP, AVIF; and deep event handling for actions, mouse, scrolling, resizing, and more.

  • Runs on the runtime you already picked. First-class support for Node.js, Bun, and Deno 2+ — same API, same imports.

  • Synchronous where it should be. GUI calls, file reads/writes, clipboard access — no unnecessary await and callbacks for things that don't need it.

  • One honest dependency. swing-ui needs a Java 11+ JDK on the system PATH to power the native rendering — the whole trade-off for skipping Chromium. It's light enough to run on a $5 Raspberry Pi Zero, just slower than on a desktop.

  • Multiple UI themes available. In addition to few themes build into Java, like metal or system look-and-feel, swing-ui includes beautiful FlatLaf themes (light and dark) from https://www.formdev.com/flatlaf/.

  • AI already writes apps with swing-ui GUI using our pre-made skill and GUI definition file schema.


Quick look

npm install swing-ui

Install it locally in each project — not with -g option.

import "swing-ui";

class HelloApp extends Window {
  constructor() {
    super("swing-ui Demo");
    this.innerSize(360, 160).position(200, 200).closeOperation(Window.CloseOperation.Exit);

    new Label("What's your name?").position(20, 20).size(300, 25).addTo(this);
    const name = new TextField("type name here").size(300, 28).position(20, 45).addTo(this);

    new Button("Greet me").position(20, 85).addTo(this)
      .onAction(e => alert(`Hello, ${name.text()}!`));

    this.show();
  }
}

globalThis.HelloApp = new HelloApp();

Run it with node index.js (or bun index.js / deno run index.js) and you get a real, resizable, native OS window — not a browser tab.

That's just a taste. Tables, trees, tabs, menus, system tray icons, custom drawing, and the full component API are all covered in the docs.


See it in action


What people build with it

  • Internal tools
  • Admin dashboards
  • Data-entry apps
  • File and asset managers
  • Monitoring utilities
  • Small line-of-business apps
  • Simple graphical games using shapes API
  • Vector drawing apps
  • Industrial control software
  • CNC software
  • Financial software with graphical graphs and charts
  • and much more...

Anywhere you want a real desktop app without the weight of a browser runtime, and without leaving JavaScript to get it. With thousands of JavaScript modules now almost anything is possible in JavaScript.


Requirements

  • Windows, Linux, or macOS
  • Node.js 18+, Bun 1.1+, or Deno 2+
  • Java 11+ JDK, with java available on the system PATH
  • 1 GHz processor and 500 MB RAM or more - light enough to even run on a $5 Raspberry Pi Zero
  • ECMAScript Module (ESM) mode only ("type": "module" in package.json)

Docs

This README is just the pitch. Everything else lives at swing-ui.com:

  • Quick onboarding guide — go from npm install to swing-ui expert in no time
  • Full JavaScript API reference, class by class
  • Coding style and patterns explained, theming, Visual GUI Designer, and UI-definition-file guides
  • More examples

Found a bug? Report it here — every report gets reviewed and helps to make swing-ui even better.