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

@lazhus/kg-ui

v0.8.1

Published

Modern, lightweight UI component library built with LitElement.

Readme

KG UI

Modern, lightweight UI component library built with LitElement.

🚀 Features

  • 40+ Modern Components - Tree, List, DataGrid, Modal, Avatar, and more
  • 🎨 Customizable Theming - CSS variables for easy customization
  • 🌓 Dark Mode Support - Built-in dark theme
  • 📱 Responsive - Mobile-first design
  • Lightweight - Built with LitElement
  • 🎯 TypeScript Ready - Full type support (Global & React/JSX)
  • Accessible - ARIA compliant components

📦 Installation

npm install @lazhus/kg-ui

🎯 Quick Start

1. Import Components

You can import components individually or as a whole:

// Import specific components
import '@lazhus/kg-ui/components/kg-button.js';
import '@lazhus/kg-ui/components/kg-input.js';

// OR import everything
import { kgbutton, kgloader, toast } from '@lazhus/kg-ui';

2. Import Styles

Add the CSS to your project:

<link rel="stylesheet" href="node_modules/@lazhus/kg-ui/dist/kg-ui.css">

Or in your JavaScript/CSS:

import '@lazhus/kg-ui/style.css';

3. Use in HTML

<kg-button color="primary">Click Me</kg-button>
<kg-input label="Username" placeholder="Enter your name" error-text="This field is required"></kg-input>
<kg-avatar name="John Doe" color="secondary"></kg-avatar>

📝 Form Integration & Validation

KG UI components are built using ElementInternals, making them natively compatible with standard <form> elements.

Form Submission

Buttons with type="submit" or type="reset" will trigger the corresponding form action:

<form id="login-form">
  <kg-input name="email" type="email" label="Email" required></kg-input>
  <kg-input name="password" type="password" label="Password" required></kg-input>
  
  <kg-button type="submit" color="primary">Sign In</kg-button>
  <kg-button type="reset" basic>Clear</kg-button>
</form>

Validation & Error Handling

All input-based components support the error-text property. Setting this property will display an error message below the component and apply error styling.

<kg-input 
  label="Username" 
  error-text="Username already exists"
></kg-input>

<kg-select 
  label="Country" 
  error-text="Please select your country"
></kg-select>

🛠 Programmatic Access

Some components can be called via JavaScript for ease of use:

Toast Notifications

import { toast } from '@lazhus/kg-ui';

toast.success('Başarılı', 'İşlem başarıyla tamamlandı.');
toast.error('Hata', 'Bir sorun oluştu.');

Loader Screen

import { loader } from '@lazhus/kg-ui';

// Show loader
loader.show({ 
  text: 'Yükleniyor...', 
  glass: true 
});

// Hide loader
setTimeout(() => loader.hide(), 3000);

🎨 Theming

KG UI uses CSS variables for easy theming:

:root {
  --kg-primary: #41ab34;
  --kg-secondary: #1367FF;
  --kg-tertiary: #FBB140;
  --kg-bg: #ffffff;
  --kg-text: #1a1a1a;
  /* ... more variables */
}

Dark Mode

Enable dark mode by adding the data-theme attribute:

document.documentElement.setAttribute('data-theme', 'dark');

📚 Components

Foundation & General

  • kg-button - Customizable button
  • kg-text - Typography system
  • kg-card - Content card
  • kg-avatar - Profile image/initials
  • kg-tag - Label/Badge
  • kg-divider - Visual separator
  • kg-image - Lazy loading image

Navigation

  • kg-breadcrumbs - Hierarchical crumbs
  • kg-tabs - Tabbed interface
  • kg-stepper - Step indicator

Form Components

  • kg-input, kg-textarea, kg-select
  • kg-checkbox, kg-radio, kg-switch
  • kg-slider, kg-datepicker, kg-colorpicker
  • kg-file-upload

Layout & Structure

  • kg-grid / kg-row / kg-column - Grid system (w/ Gap & Align)
  • kg-accordion - Collapsible sections
  • kg-modal - Modal dialog
  • kg-drawer - Side panel

Feedback & Overlays

  • kg-toast - Programmatic notification
  • kg-tooltip - Contextual info balon
  • kg-loader - Full-screen overlay
  • kg-spinner - Loading indicator
  • kg-progress - Progress bar
  • kg-skeleton - Loading placeholder

Data

  • kg-tree - Hierarchical tree structure
  • kg-list - Structured list rows
  • kg-datagrid - Powerful data table

📄 License

MIT © Kolay Gelsin FE Team