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 🙏

© 2024 – Pkg Stats / Ryan Hefner

ketchup-lite-react

v1.7.3

Published

Ketchup Lite React Components library

Downloads

3,326

Readme

Ketchup Lite

Components npm Package

Ketchup Lite Logo

GitHub top language GitHub last commit GitHub Actions Workflow Status

Ketchup Lite is a lightweight and versatile Web Components library designed to enhance your web development experience. It is a fork stemming from the original Ketchup project, aiming to provide a streamlined and efficient set of tools for developers.

Built with modern standards and best practices in mind, Ketchup Lite offers a collection of reusable components that can seamlessly integrate into any web project, regardless of the framework or vanilla JavaScript setup.

Next.js-deployed showcase

Table of Contents

Features

  • Customizable: Easily tailor the appearance and behavior of components to match your project's design system.
  • Accessible: Designed with accessibility in mind, ensuring that your applications are usable by everyone.
  • Efficient: Lightweight components that won't slow down your application.
  • Cross-Browser Compatible: Works across all major browsers without additional polyfills.
  • Framework Agnostic: Use with React, Vue, Angular, or just plain JavaScript.

(Back to Top)

Getting Started

Installation

To add Ketchup Lite to your project, you can install it via yarn:

yarn install ketchup-lite

Usage

After installing, you can import and use Ketchup Lite components in your project. Here's a quick example of how to use the <kul-button> component:

<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8" />
        <title>Ketchup Lite Example</title>
        <script
            type="module"
            src="./path/to/ketchup-lite/dist/index.js"
        ></script>
    </head>
    <body>
        <kul-button kul-label="Click me!" />
    </body>
</html>

Make sure to replace ./path/to/ketchup-lite/dist/index.js with the correct path to the index.js file in your node_modules/ketchup-lite directory.

(Back to Top)

Main differences from Ketchup

Ketchup Lite, while sharing a common heritage with the original Ketchup project, has been tailored to cater to specific needs and preferences. Here are some key differences that set Ketchup Lite apart:

  • Lighter: Ketchup Lite is designed to be significantly lighter, making it an ideal choice for personal websites or smaller projects where performance and load times are critical.

  • Oriented Towards Personal Websites/Projects: With a focus on simplicity and ease of use, Ketchup Lite is more suited for individual developers or small teams working on personal projects. It offers a streamlined set of features that are easy to implement and maintain.

  • Glassmorphism Look: Ketchup Lite incorporates a glassmorphism aesthetic throughout its components. This gives a modern, transparent, and sleek appearance to the UI elements, enhancing the visual appeal of personal projects.

  • Absence of the KupObj Concept: Unlike the original Ketchup, Ketchup Lite does not include the KupObj concept.

  • Absence of FComponents: Given the library's limited scope, converting its basic components to functional components is unnecessary. If you plan to add thousands of nested web components, it is recommended to stick to the original project.

  • Event Management: Each component emits a single generic event that encapsulates various actions. Here is an example of how to listen for a button's click event:

const myButton = document.querySelector('kul-button');
myButton.addEventListener('kul-button-event', (e) => {
    if (e.detail.eventType === 'click') {
        console.log('Click!');
    }
});

(Back to Top)

Documentation

For detailed information about each component, including available properties, events, and methods, please refer to the showcase.

(Back to Top)

Contributing

I'm working on this project primarily for fun and for my portfolio website during my free time, but P.R. from other users that find this library useful are welcome!

(Back to Top)

Credits

Special thanks to the following libraries and frameworks that make this project possible:

  • Lerna for managing the monorepo structure.
  • Stencil for building fast web apps using Web Components.
  • Echarts for providing data visualization components.
  • Ketchup for the original project from which Ketchup Lite is derived.

(Back to Top)