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

simple-react-ui-kits

v1.0.1

Published

A lightweight, customizable React UI component library built with TypeScript and Tailwind CSS

Downloads

10

Readme

Simple React UI Kit

A lightweight, customizable React component library built with TypeScript and Tailwind CSS.

Features

  • 🎨 Modern Design: Clean and accessible components
  • 📦 TypeScript: Full TypeScript support with proper type definitions
  • 🎯 Customizable: Easy to customize with Tailwind CSS classes
  • 🚀 Lightweight: Minimal bundle size with tree-shaking support
  • Accessible: Built with accessibility in mind

Installation

npm install simple-react-ui-kits
# or
yarn add simple-react-ui-kits

Note: This package requires Tailwind CSS to be installed in your project for styling to work properly.

React Version Compatibility

This library is compatible with React versions 16.8.0 and above, including:

  • ✅ React 16.8+ (with hooks support)
  • ✅ React 17.x
  • ✅ React 18.x
  • ✅ React 19.x

Important: React 16.8.0 is the minimum version required because this library uses React hooks. If you're using an older version of React, you'll need to upgrade to at least 16.8.0.

Usage

import { Button, Input, Card, Badge } from "simple-react-ui-kits";

function App() {
  return (
    <div>
      <Button variant="primary" size="md">
        Click me
      </Button>

      <Input label="Email" placeholder="Enter your email" type="email" />

      <Card>
        <CardHeader>
          <h3>Card Title</h3>
        </CardHeader>
        <CardBody>
          <p>Card content goes here</p>
        </CardBody>
      </Card>

      <Badge variant="success">Success</Badge>
    </div>
  );
}

Components

Button

A versatile button component with multiple variants and sizes.

import { Button } from "simple-react-ui-kits";

// Variants: primary, secondary, outline, ghost, danger
// Sizes: sm, md, lg
<Button variant="primary" size="md" loading={false}>
  Click me
</Button>;

Props:

  • variant: 'primary' | 'secondary' | 'outline' | 'ghost' | 'danger'
  • size: 'sm' | 'md' | 'lg'
  • loading: boolean
  • All standard button HTML attributes

Input

A flexible input component with support for labels, errors, and icons.

import { Input } from "simple-react-ui-kits";

<Input
  label="Email"
  placeholder="Enter your email"
  error="Please enter a valid email"
  helperText="We'll never share your email"
/>;

Props:

  • label: string
  • error: string
  • helperText: string
  • leftIcon: React.ReactNode
  • rightIcon: React.ReactNode
  • All standard input HTML attributes

Card

A card component with header, body, and footer sections.

import { Card, CardHeader, CardBody, CardFooter } from "simple-react-ui-kits";

<Card>
  <CardHeader>
    <h3>Card Title</h3>
  </CardHeader>
  <CardBody>
    <p>Card content goes here</p>
  </CardBody>
  <CardFooter>
    <Button>Action</Button>
  </CardFooter>
</Card>;

Badge

A badge component for displaying status, labels, or counts.

import { Badge } from "simple-react-ui-kits";

// Variants: default, primary, secondary, success, warning, danger
// Sizes: sm, md, lg
<Badge variant="success" size="md">
  Active
</Badge>;

Hooks

useToggle

A custom hook for toggle functionality.

import { useToggle } from "simple-react-ui-kits";

function MyComponent() {
  const [isOpen, toggle, setIsOpen] = useToggle(false);

  return <button onClick={toggle}>{isOpen ? "Close" : "Open"}</button>;
}

useLocalStorage

A custom hook for localStorage functionality.

import { useLocalStorage } from "simple-react-ui-kits";

function MyComponent() {
  const [theme, setTheme] = useLocalStorage("theme", "light");

  return (
    <button onClick={() => setTheme(theme === "light" ? "dark" : "light")}>
      Current theme: {theme}
    </button>
  );
}

Utils

cn

A utility function for combining class names.

import { cn } from "simple-react-ui-kits";

const className = cn("base-class", condition && "conditional-class", {
  "object-class": true,
});

Formatters

Utility functions for formatting data.

import {
  formatNumber,
  formatDate,
  formatCurrency,
  truncateText,
} from "simple-react-ui-kits";

formatNumber(1234567); // "1,234,567"
formatDate(new Date()); // "12/25/2023"
formatCurrency(99.99); // "$99.99"
truncateText("Long text here", 10); // "Long text..."

Development

Prerequisites

  • Node.js 16+
  • npm or yarn

Setup

  1. Clone the repository

  2. Install dependencies:

    npm install
  3. Build the library:

    npm run build
  4. Development mode:

    npm run dev

Scripts

  • npm run build - Build the library
  • npm run dev - Development mode with watch
  • npm run type-check - Type checking
  • npm run clean - Clean dist folder

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

License

MIT