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

@redot-src/glare

v1.4.0

Published

Modern, touch-enabled, fully customizable lightbox for the web — zero dependencies.

Readme

Glare

A lightbox for the web that opens anything: images, video, YouTube and Vimeo, maps, iframes, nodes from the page, fetched fragments, and plain HTML. Vanilla TypeScript, zero dependencies, MIT.

Docs and live demo →

Why Glare

Most lightboxes were built for one job, images, and everything else got bolted on: a jQuery dependency here, a video plugin there, a second library for touch gestures. Glare starts from the other end. It is one small class with a single way to describe a slide, and the slide can be any kind of content.

  • One API for every content type. Point it at a URL and it works out whether that is an image, a video, a YouTube watch page, or a PDF. Set type for the cases it cannot guess.
  • Touch-first. Swipe to change slides, swipe down to close, pinch to zoom, drag to pan. Mouse and keyboard get the same behavior.
  • Accessible by default. A real role="dialog", focus trap, restored focus on close, slide announcements in a live region, translatable labels, and prefers-reduced-motion support.
  • Yours to style. Colors, radius, blur, and fonts are CSS variables. State classes cover every mode. Every piece of markup is a template you can replace.
  • Small and dependency-free. About 16 kB of JavaScript and 3 kB of CSS, gzipped. No jQuery, no framework, no peer dependencies.
  • Typed. Written in TypeScript, shipped as ESM and UMD with declaration files.

What it does

| Feature | Details | | ------------ | ---------------------------------------------------------------------------------------- | | Galleries | Group links with data-glare="name", or pass an array. Loop, arrows, counter, captions. | | Content | image, video, embed, iframe, inline, ajax, html. Providers for YouTube, Vimeo, Google Maps. | | Zoom | Click or pinch to zoom, drag to pan, mouse wheel to change slides. | | Modules | Thumbnail strip, slideshow with progress bar, fullscreen, URL hash deep links. | | Toolbar | Configurable buttons that collapse into a menu on small screens. | | Events | Lifecycle and per-slide callbacks; beforeClose can cancel. |

Quick start

npm install @redot-src/glare
import Glare from '@redot-src/glare'
import '@redot-src/glare/style.css'

Glare.bind('[data-glare]', { loop: true })
<a data-glare="trip" href="lake.jpg" data-caption="Alpine lake at dusk">
  <img src="lake-thumb.jpg" alt="Alpine lake at dusk" />
</a>
<a data-glare="trip" href="https://www.youtube.com/watch?v=XXXXXXXXXXX">
  <img src="video-thumb.jpg" alt="Trip video" />
</a>

Or from code:

Glare.open([{ src: 'lake.jpg', caption: 'Alpine lake at dusk' }, { src: 'dunes.jpg' }], { loop: true })

No bundler? Load it from a CDN and use the global Glare:

<link rel="stylesheet" href="https://unpkg.com/@redot-src/glare/dist/glare.css" />
<script src="https://unpkg.com/@redot-src/glare/dist/glare.js"></script>

The Getting started guide continues from here.

Built by Redot

Glare is created by Redot. Building a Laravel app? Redot ships production-ready admin dashboards with auth, roles, CRUD, and datatables.

Development

npm install
npm run dev          # docs + interactive demo with live reload
npm run build        # typecheck + library build → dist/
npm run docs:build   # static site, as deployed to GitHub Pages

Inside the docs, @/ resolves to src/, so the demo imports the library the same way users do.

src/
  index.ts        public API and type exports
  esm.ts          ESM build entry: the API plus the stylesheet
  umd.ts          UMD/CDN build entry: exposes the class as window.Glare
  types.ts        public types
  defaults.ts     default options
  i18n.ts         built-in strings
  templates.ts    HTML templates for the dialog and buttons
  core/           the Glare class and its collaborators (lifecycle, DOM, loaders, zoom, bind)
  media/          URL type detection, providers (YouTube, Vimeo, Maps), item normalization
  modules/        optional features: fullscreen, gestures, hash, slideshow, thumbs, wheel
  styles/         stylesheet split by concern; tokens.css holds the public CSS variables
  utils/          small DOM, object, environment, and template helpers
docs/
  index.md        the demo page: prose in markdown, interactive parts as components
  guide/, api/    documentation
  .vitepress/
    config.ts       site config and the `@` alias
    theme/          restyled default theme; demo/ holds the demo data and components
  public/demo/    static files the demo fetches

License

MIT