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

tiny-popup

v0.1.11

Published

Robust, minimal, humane lightbox

Downloads

4

Readme

About

TinyPopup is designed to be the most minimal lightbox-style popup window while still providing robust behavioral characteristics. These are, ability to handle scrolling without losing position, handling resizing of the browser window, and handling click-to-close such that we almost can't create an un-dismissable dialog.

Goals

Single file with all needed styling and behavior. No external css or image files required. The total minified size is a bit over 1k, I'd like to keep it hovering just at the 1k mark.

No external dependencies. We don't need jQuery or anything like that for this to work. My initial use case for this library is a userjs/Greasemonkey script so I don't want to have to pull in any external things to make this work.

Robust behavior - no funny stuff on different browsers with regards to scaling, scrolling, window resizing, getting stuck open, etc.

Mobile support - I'm aiming to fully support mobile devices, although I've only tested things out on iOS thus far.

Nothing but what is necessary to show a centered popup dialog. No extra styling beyond the css positioning code needed to make it show/hide properly. However, it is styleable externally using css. This is the preferred method of working with TinyPopup.

Future Work

  • Provide callback registration for notification of popup dismissal. I didn't need this right away so I didn't implement it. However, it may fall within scope here.

  • Register and coordinate multiple popups. I didn't need this right away but I'm thinking about providing some support for several different named popups based on html template chunks. We'd want to use the same shadow element I think and we'd want to ensure that only one popup can show at once.