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_ui_elements

v1.0.24

Published

A simple UI components library for React with Tailwind CSS.

Readme

Simple-UI-Elements

Installation and usage

The easiest way to use ui-element is to install it from npm and build it into your app.

yarn add simple_ui_elements
npm install simple_ui_elements
pnpm install simple_ui_elements

npx simple_ui_elements@latest setup

Getting Started

Features

✅ Pre-built Components – Buttons, Inputs, Selects, Modals, and more
✅ Tailwind CSS Integration – Fully customizable with utility classes
✅ Theme Support – Easily update colors, typography, and styles
✅ Lightweight & Performant – Optimized for fast rendering
✅ Easy integration with react-hook-form and formik – Simplifies form handling,
✅ Fully TypeScript supported
✅ Custom validation support

COMPONENTS

Button

  <Button
    color={"primary"} //Change according to your preferences
    size={"md"}
    className="px-40"
  >
    Primary Button
  </Button>

   <Button
      color={"secondary"}
      size={"md"}
      // Add icon options
      startIcon={<Icon className="text-white" />}
      endIcon={<Icon className="text-white" />}
      isLoading //Button loader
    >
      Secondary Button
    </Button>

INPUT ELEMENTS

  <Input placeholder="This is normal input" />
  <InputTextArea
    placeholder="This is normal input"
  />
  <TimePicker
    onChange={() => { }}
    label={""}
  />
  <ToggleSwitch />
  <Checkbox />
  <Radio />

Select

 <SingleSelect
    onSelect={() => { }}
    options={[]}
    width="md"
    value={""}
    placeholder="Single select"
  />

  <MultiSelect
    onSelect={() => { }}
    options={[]}
    width="md"
    placeholder="Multi select"
  />

🎨 Customization

Supports Tailwind CSS configuration out of the box. To customize colors and styles, update your tailwind.config.js:

module.exports = {
  theme: {
    extend: {
      colors: {
        primary: 'var(--primary)',  // Example primary color
        secondary: 'var(--secondary)',  // Example secondary color
        destructive: "var(--destructive)",
        input: "var(--input)",
        background: "var(--background)"
      },
    },
  },
};

styles/global.css
@import "tailwindcss";

@layer base {
  :root {
    /* Colors */
    --primary: #007bff;
    --secondary: #6c757d;
    --destructive: #ff0000;

    --border: #f5f5f5;
    --background: #fff;

    --input: #f5f5f5;
  }
}

Usage with Forms

Using with FORMIK

import { useFormik } from "formik";
import FormInput from "./form/form-input"

//
export function FormikForm (){
 const formik = useFormik<LoginFormValues>({
    initialValues: {
      email: "",
      description:"",
      year:""
    },
    validationSchema: validationSchema,
    onSubmit: async (values, actions) => {
    }
 })
 return(
  <form onSubmit={formik.handleSubmit}>
    <FormInput
      id="email"
      type="email"
      placeholder="[email protected]"
      {...formik.getFieldProps("email")}
      error={
        formik.touched.email && formik.errors.email
          ? formik.errors.email
          : undefined
      }
      disabled={formik.isSubmitting}
      label="Email"
      required
    />
    <FormTextAreaInput
      id="description"
      placeholder="Enter description here..."
      {...formik.getFieldProps("description")}
      error={formik.errors?.description}
      disabled={isSubmitting}
      label="Description"
      required
    />
    <FormSelect
      name={field.name}
      items={options}
      value={options.find((opt) => opt.value === values.year) || ""}
      onSelect={(option) => setFieldValue("year", option?.value || "")}
      placeholder="Choose an option"
     />
    <Button
      color={"primary"}
      size={"md"}
      type="submit
    >
      Submit
    </Button>
  </form>
 )
}

Using with React-hook-form

import { useForm, Controller } from "react-hook-form";
import FormInput from "./form/form-input"

//
export function ReactHookForm (){
   const {
    register,
    control,
    handleSubmit,
    formState: { errors, isSubmitting },
  } = useForm({
    resolver: zodResolver(validationSchema),
  });
 return(
  <form onSubmit={handleSubmit(()=>{})}>
    <FormInput
      id="email"
      type="email"
      placeholder="[email protected]"
      {...register("email")}
      error={errors.email?.message}
      disabled={isSubmitting}
      label="Email"
      required
    />
    <FormTextAreaInput
      id="description"
      placeholder="Enter description here..."
      {...register("description")}
      error={errors.description?.message}
      disabled={isSubmitting}
      label="Description"
      required
    />
    <Controller
      name="year"
      control={control}
      render={({ field }) => (
        <FormSelect
          name={field.name}
          items={options}
          value={options.find((opt) => opt.value === field.value) || ""}
          onSelect={(option) => setValue("mySelect", option?.value || "")}
          placeholder="Choose an option"
        />
      )}
    />
    <Button
      color={"primary"}
      size={"md"}
      type="submit
    >
      Submit
    </Button>
  </form>
 )
}

🔗 Links 📦 NPM Package: simple_ui_elements 📖 Documentation: simple_ui_elements

🚀 Start building better UI today!