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

q-react-ui

v0.1.2

Published

A clean, minimal, tree-shakable React UI components & hooks.

Readme

q-react-ui

A clean, minimal, tree-shakable React UI components & hooks.

Installation

⚠ You must install q-js-utils, unless you already have it installed.

npm install q-react-ui q-js-utils

Or

yarn add q-react-ui q-js-utils

Components

  1. Avatar
  2. AvatarGroup
  3. Form
  4. Resizable
  5. Editor (based-on monaco-editor)

Usage

import { Avatar, AvatarGroup, type AvatarItemProps } from 'q-react-ui';

const App = () => {
  const users: AvatarItemProps = [
    {
      alt: "Muhamad Husein",
    },
    {
      alt: "Tony Start"
    },
    {
      alt: "Peter Parker"
    },
    {
      alt: "Clark Kent"
    },
    {
      alt: "Diana Prince"
    },
    {
      alt: "Bruce Wayne"
    },
    {
      alt: "John Doe"
    }
  ];

  return (
    <>
      <Avatar
        alt="Muhamad Husein"
        src="https://avatars.githubusercontent.com/u/19644272?v=4"
      />

      <Avatar
        size={55}
      />

      <Avatar
        alt="Steve Roger" 
        size={55}
      />

      <h2>AvatarGroup</h2>
      <AvatarGroup
        size={57}
        items={users.map((item: any) => ({ ...item, className: "rounded-full" }))}
        renderRemaining={(remaining, remaningProps, remainingItems) => (
          <div 
            {...remaningProps}
            className={"bg-red-400 " + remaningProps.className + " text-red-100"}
            title={remainingItems.map(item => item.alt).join('\n')}
          >
            +{remaining}
          </div>
        )}
      />

      <hr />

      <AvatarGroup
        items={users.map((item: any) => ({ ...item, className: "rounded-full" }))}
      />
    </>
  );
}

Or single import for tree-shaking.

import { Avatar } from 'q-react-ui/Avatar';
import { AvatarGroup } from 'q-react-ui/AvatarGroup';

About Tree-Shaking:


Hooks

A React Hook to detect and monitor the browser's online/offline network status. It provides the current network status as a boolean and allows optional callbacks for when the network status changes.

useNetwork

import { useNetwork } from 'q-react-ui/useNetwork';

Usage

import { useNetwork } from 'q-react-ui/useNetwork';
import { cn } from 'q-js-utils/cn';

const App = () => {
  const isOnline = useNetwork({
    onOnline: () => alert('ONLINE'),
    onOffline: () => alert('OFFLINE'),
  });

  return (
    <div>
      <h4 
        className={
          cn(
            "text-2xl font-bold", 
            isOnline ? "text-blue-600" : "text-red-600"
          )
        }
      >
          {isOnline ? "Online" : "Offline"}
        </h4>
    </div>
  );
}

Next Devs:

Components

  1. Img / Image 🔧📝
  2. Textarea 🔧📝
  • https://github.com/Andarist/react-textarea-autosize
  • https://github.com/react-component/textarea
  1. AdaptiveItems 🔧📝