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

kitzo

v2.1.29

Published

A lightweight JavaScript & React UI micro-library.

Readme

kitzo

npm

A lightweight library of Vanilla js and React js

Vanilla js
  • Copy on click
  • Tooltip on mouseover
  • Ripple effect on mousedown
  • Debounce function
  • Hover clip-path effect
React js
  • React Toast notifications
  • Tooltip wrapper component

Install

npm i kitzo

or

<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/kitzo.umd.min.js"></script>

Vanilla: Attach this script tag in the html head tag and you are good to go.


API links

Vanilla APIs

// NPM usage
import kitzo from 'kitzo';

kitzo.copy();
kitzo.tooltip();
kitzo.ripple();
kitzo.debounce();
kitzo.clippath();
kitzo.getType();

Use a modern build tool. vite - recommended

Copy API:
kitzo.copy(doc);

Copy functionality on call.

Tooltip API:
kitzo.tooltip(selectors | element | NodeList, {
  tooltip: string,
  direction: 'top' | 'right' | 'bottom' | 'left',
  arrow: 'on' | 'off',
  offset: number,
  customClass: string,
  style: object,
});

Attach minimal tooltips to buttons for clean, helpful hover hints.

Ripple API:
kitzo.ripple(selectors | element | NodeList, {
  opacity: number,
  duration: number,
  color: string,
  size: number,
});

Adds a lightweight, clean ripple effect to your elements on click.

Debounce API:
kitzo.debounce(callback, delayInMilliseconds);
// Log only after typing stops for 500ms
const logSearch = kitzo.debounce((text) => {
  console.log('Searching for:', text);
}, 500);

// Attach to input
document.querySelector('#search').addEventListener('input', (e) => {
  logSearch(e.target.value);
});

Debounce on every call of function.

Clippath API:
kitzo.clippath(selectors | element | NodeList, {
  textOption: null | { selector: string, value: string | number },
  clippathSize: string | number,
  smooth: boolean,
  class: string,
  style: object,
});
TypeCheck API:
kitzo.getType(type);

const data = [];
console.log(kitzo.getType(data)); // 'array'

React

Install

npm i kitzo

React APIs

import { ToastContainer, toast, Tooltip, ... } from 'kitzo/react';
Toast API:
import { toast } from 'kitzo/react';

toast.success('toast message', { duration: 2000, style: {}, showIcon: true, position: 'top-center' });
toast.error('toast message', { duration: 2000, style: {}, showIcon: true, position: 'top-center' });

toast.promise(
  promise(), // call a function that returns promise
  {
    loading: 'Saving...',
    success: 'Saved' | (response) => 'Saved',
    error: 'Error occured' | (error) => 'Error occured',
  },
  { duration: 2000, style: {}, showIcon: true, position: 'top-center' },
);

// JSX element
toast.custom(<MyCustomComponent />, { duration: 2000, position: 'top-center' });

// Function that receives a dismiss handler
toast.custom((dismiss) => (
  <div>
    <span>Custom toast message</span>
    <button onClick={dismiss}>Close</button>
  </div>
), { duration: 3000 | Infinity });

// (and optionally)
toast.custom("string");
React Toast API Usage
import { ToastContainer, toast } from 'kitzo/react';

function App() {
  function fakePromise() {
    return new Promise((resolved, rejected) => {
      setTimeout(() => {
        Math.random() > 0.5 ? resolved('resolved') : rejected('rejected');
      }, 2000);
    });
  }

  function promiseToast() {
    toast.promise(
      fakePromise(),
      {
        loading: 'Saving data...',
        success: 'Data saved',
        error: 'Failed saving data',
      },
      { duration: 2500, position: 'top-center' },
    );
  }

  function customToast() {
    toast.custom(
      (dismiss) => (
        <div>
          <span>Funtion that return jsx</span>
          <button onClick={dismiss}>Close</button>
        </div>
      ),
      {
        duration: 2000,
        position: 'top-center',
      },
    );
  }

  return (
    <div>
      <button onClick={() => toast.success('✅ Success toast message')}>Succes</button>
      <button onClick={() => toast.error('❌ Error toast message')}>Error</button>
      <button onClick={promiseToast}>Promise</button>
      <button onClick={customToast}>Custom Toast</button>

      {/* Toast container must needed */}
      <ToastContainer />
    </div>
  );
}

Each toast can have its own position. default position is top-center.

React Tooltip API:
import { Tooltip } from 'kitzo/react';

function App() {
  return (
    <div>
      <h1>Tooltip api</h1>

      <div>
        <Tooltip
          content="Tooltip"
          tooltipOptions={{
            offset: 10,
            smartHover: true,
          }}
          animate={{
            duration: 120,
            startDelay: 400,
            endDelay: 50,
          }}
          style={{
            '--arrow-size': 6,
            '--arrow-color': 'red'
          }}
        >
          <button>Hover me</button>
        </Tooltip>
      </div>
    </div>
  );
}

You can provide your own custom jsx element as content. e.g. content={<div>Custom tooltip</div>}