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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@usman404/crowjs

v1.0.4

Published

lightweight and extensible GUI library built on top of p5.js

Readme

CrowJS 🐦‍⬛

CrowJS is a lightweight and extensible GUI library built on top of p5.js, designed for creative coders and simulation builders who need intuitive, canvas-native UI components like buttons, sliders, input fields, and more — all rendered directly inside the p5.js canvas.

Logo

✨ Features

  • Minimal and canvas-native UI for p5.js sketches
  • Frames, nested layouts, scrollable & grid containers
  • Customizable UI components: buttons, sliders, toggles, input fields, etc.
  • Event system inspired by the web (click, hover, focus, blur)
  • Modular design with support for custom components
  • Fully drawn inside p5.js (no HTML overlays or DOM interference)
  • Ideal for creative coding, simulations, visual experiments, and tools

🚀 Getting Started

1. Install

To use CrowJS, begin by downloading this repository and placing the CrowJS folder inside your project's source code.
Once included, open the index.html file in your browser; it already contains the required setup for p5.js and for loading CrowJS modules.

All GUI development should be done inside sketch.js, which serves as the main entry point for both your p5.js sketch and all CrowJS components.


⚠ Important Notes

  • Do not rename the sketch.js file. CrowJS depends on this filename for consistent module loading.
  • Do not alter the structure or script tags inside index.html. Modifying them may prevent CrowJS from running correctly.
  • A CDN-based installation method will be added in the future to make setup even easier.

2. Basic Example

import { Root } from "./Core/Root.js";
import { Label } from "./UIComponents/Label.js";


/** @type {Root} */
let root;
let clickTimes=1;

window.setup = function(){
    createCanvas(windowWidth, windowHeight);
    root = new Root();

    let btnWidth = 200;
    let btnHeight = 100;

    let btn = new Label((windowWidth/2)-(btnWidth/2), (windowHeight/2)-(btnHeight/2), 200, 100, "Hello! 👋", 
      {cornerRadius: 20,
       backgroundColor: "rgba(0, 0, 0, 1)",
       textColor: "rgba(255, 255, 255, 1)",
      });

    btn.addEventListener("click", (event)=>{
      clickTimes+=1;
      event.target.setText(`You clicked ${clickTimes} \ntimes!`);
    });

    root.add(btn);
}

window.draw = function () {
  background('rgba(255,255,255,255)');
  root.show();
  root.mouseEnterEventListeners(mouseX, mouseY);
  root.hoverEventListeners(mouseX, mouseY);
  root.mouseLeaveEventListeners(mouseX, mouseY);
  root.keyDownEventListeners(mouseX, mouseY);
}

window.mouseDragged = function (){
  root.mouseDraggedEventListeners(mouseX, mouseY);
}

window.mouseClicked = function(){ 
  root.mouseClickedEventListeners(mouseX, mouseY);
}

window.mousePressed = function(){
  root.mousePressedEventListeners(mouseX, mouseY);
}

window.mouseReleased = function(){
  root.mouseReleasedEventListeners(mouseX, mouseY);
}

window.mouseWheel = function(event){
  root.mouseWheelEventListeners(mouseX, mouseY, event);
}

window.keyPressed = function(event){
  if (keyCode === UP_ARROW || keyCode === DOWN_ARROW || keyCode === LEFT_ARROW || keyCode === RIGHT_ARROW) {
    event.preventDefault();
  }

  root.keyPressedEventListeners(mouseX, mouseY);
}

🧰 Components Overview

  • Label(x, y, width, height, text, {options})
  • ScrollFrame, GridFrame, Label, etc.

More components and documentation coming soon.

📚 Documentation & Tutorials

A full video series and documentation site are in the works!
Stay tuned for:

  • Getting started tutorials
  • Custom component creation
  • Internals of CrowJS for contributors

💡 Why CrowJS?

While p5.js is amazing for generative art and simulations, there's a noticeable gap when it comes to in-sketch UI. CrowJS fills that gap by giving you a canvas-first GUI framework that blends seamlessly with your visuals.

🤝 Contributing

CrowJS is open-source! Contributions, bug reports, and ideas are welcome.
See the CONTRIBUTING.md file for details.

📄 License

This project is licensed under the MIT License.
See the LICENSE file for details.

🌐 Links

Created with ❤️ by Usman