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

lightweight-tip-component

v0.0.5

Published

A lightweight tooltip component built with Web Components, zero dependencies, small bundle size and easy to use.

Readme

Lightweight Tip Component

A lightweight tooltip component that can be used in any web project.

Language: English | 中文

✨ Features

  • 🚀 Lightweight: Small bundle size, no external dependencies
  • 📱 Responsive: Automatically adapts to different screen sizes
  • 🎨 Customizable: Supports custom styles and themes
  • 🔧 Easy to use: Simple API, quick integration
  • 🌐 Cross-browser: Compatible with modern browsers
  • High performance: Optimized rendering and event handling
  • 🎯 Flexible positioning: Multiple positioning options
  • 🔄 Dynamic content: Supports dynamic content updates

📦 Installation

npm install lightweight-tip-component
# or
yarn add lightweight-tip-component
# or
pnpm add lightweight-tip-component

🚀 Quick Start

Basic Usage

<!DOCTYPE html>
<html>
<head>
    <title>Tooltip Demo</title>
</head>
<body>
    <!-- use in html -->
    <jk-tip>This is a long text, and a hint will be automatically displayed when the container width is insufficient.</jk-tip>
    <script type="importmap">
    {
        "imports": {
        "lightweight-tip-component": "./node_modules/lightweight-tip-component/dist/lightweight-tip-component.es.js"
        }
    }
    </script>
    <script type="module">
        import TipWebComponent from 'lightweight-tip-component';
        TipWebComponent.define('my-tips');
    </script>
</body>
</html>

Module Usage

import TipWebComponent from 'lightweight-tip-component';

// Or import a specific class
import TipWebComponent from 'lightweight-tip-component';

// The component is automatically registered as a <jk-tip> tag
// Or manually register as a custom tag name
TipWebComponent.define('my-tip');

📖 Usage Examples

Basic Tooltip

<jk-tip>Normal text tip</jk-tip>

Custom Position

<div style="width: 200px;">
  <jk-tip>This is a long text, when the container width is insufficient, the full content will be automatically displayed.</jk-tip>
</div>

🛠 Development

Local Development

# Clone the repository
git clone https://github.com/JinMokai/lightweight-tip-component.git
cd lightweight-tip-component

# Install dependencies
pnpm install

# Start development server
pnpm run dev

Build

# Build library
pnpm run build

Preview

pnpm run preview

next

  • [ ] add custom style
  • [ ] add custom event
  • [ ] add custom position

🤝 Contributing

Contributions are welcome! Please follow these steps:

  1. Fork this repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

📞 Contact

If you have any questions or suggestions, feel free to contact us:

🙏 Acknowledgments

Thanks to the xy-ui project for inspiration and reference.