New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

q-react-ui

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

q-react-ui

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

latest
Source
npmnpm
Version
0.1.2
Version published
Maintainers
1
Created
Source

q-react-ui

Latest Stable Version Total Downloads License

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

  • Avatar
  • AvatarGroup
  • Form
  • Resizable
  • 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

  • Img / Image 🔧📝
  • Textarea 🔧📝
  • AdaptiveItems 🔧📝

Keywords

react

FAQs

Package last updated on 26 Aug 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts