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

avihang-react-design

v0.0.58

Published

A simple ui library for React

Readme

avihang-react-design

Overview

A modern, accessible React UI component library designed for Avihang Company.

Installation

npm install avihang-react-design
# or
yarn add avihang-react-design

Importing Library Styles

To use the styles, import them in your main entry file (src/main.tsx):

import { StrictMode } from "react";
import { createRoot } from "react-dom/client";
import App from "./App.tsx";
import "avihang-react-design/dist/style.css";

createRoot(document.getElementById("root")!).render(
  <StrictMode>
    <App />
  </StrictMode>
);

Quick Start

import { Button, Tooltip } from "avihang-react-design";

function App() {
  return (
    <div>
      <Button variant="subtle" size="lg" styles="natural">
        Click me
      </Button>
      <Tooltip content="home">
        <Button styles="natural">Go home</Button>
      </Tooltip>
    </div>
  );
}

Core Principles

  • Customization: Easily themeable through CSS variables.
  • Performance: Lightweight and tree-shakeable.
  • TypeScript: Full TypeScript support with detailed type definitions.

Components

Button

The Button component is used to trigger actions or events.

Props

| Prop | Type | Default | Description | |----------|--------------------------------------|----------|----------------------------------| | styles | 'primary' \| 'secondary' \| 'natural' | 'primary' | The visual style of the button. | | size | 'sm' \| 'md' \| 'lg' | 'md' | The size of the button. | | disabled | boolean | false | Whether the button is disabled. | | onClick | React.MouseEventHandler | - | Click event handler. |

Examples

// Primary button
<Button styles="primary">Primary Button</Button>

// Secondary button
<Button styles="secondary" size="lg">
  Large Secondary Button
</Button>

// Disabled button
<Button disabled>Disabled Button</Button>

Dependencies

This project uses Radix UI and ShadCN for headless UI components.

Custom Theme

You can create a custom theme by modifying your index.css file in the libary:

 [data-theme="halloween"] {
    --color-Primary-50: 255 242 204; /* Light Cream */
    --color-Primary-100: 255 230 153; /* Light Yellow */
    --color-Primary-200: 255 217 102; /* Yellow */
    --color-Primary-300: 255 204 51; /* Golden Yellow */
    --color-Primary-400: 255 191 0; /* Gold */
    --color-Primary-500: 255 178 0; /* DeeP Gold */
    --color-Primary-600: 230 162 0; /* Darker Gold */
    --color-Primary-700: 204 147 0; /* Even Darker Gold */
    --color-Primary-800: 178 132 0; /* Almost Brown Gold */
    --color-Primary-900: 153 117 0; /* Brown Gold */
    --color-Primary: 255 178 0; /* Deep Gold */

    --color-Secondary-50: 255 102 0; /* Light Orange */
    --color-Secondary-100: 255 128 25; /* Lighter Orange */
    --color-Secondary-200: 255 153 51; /* Light-Medium Orange */
    --color-Secondary-300: 255 178 77; /* Medium Orange */

and then use useTheme custom hook in your project to change the theme

import { Button, useTheme } from "avihang-react-design";

const App = () => {
  const  setTheme  = useTheme(); 

  return (
    <div>
      <Button styles="primary" onClick={() => setTheme("halloween")}>
        Switch to Halloween Theme
      </Button>
    </div>
  );
};

Building & Publishing

To add or modify components, follow these steps:

  1. Update the version number in package.json.
  2. Run the build process:
    npm run build
  3. Publish the package to npm:
    npm publish