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

@creaditor/cdtr-loader

v0.1.0

Published

Embeddable <cdtr-loader> web component. Decorative loader themed for building a newsletter — a cursor drags in a block, resizes it on the edges, then drops in a photo. Pure CSS keyframes, no JS animation loop.

Readme

@creaditor/cdtr-loader

Embeddable <cdtr-loader> web component. A purely decorative loading animation themed around building a newsletter: a cursor drags a fresh block onto the page, grabs the edge handles to resize it, then drops in a photo — before the whole thing resets and loops. Drop it wherever you'd otherwise show a spinner.

Built with Lit. The entire animation is pure CSS keyframes — there's no JS animation loop, so it's GPU-friendly and cheap. It auto-plays, takes no interaction, and honors prefers-reduced-motion.

Install

npm install @creaditor/cdtr-loader

Use

As an ES module

<cdtr-loader size="400"></cdtr-loader>

<script type="module">
  import '@creaditor/cdtr-loader';
</script>

Importing the package registers the <cdtr-loader> custom element as a side effect. You can also import the class directly:

import { CdtrLoader } from '@creaditor/cdtr-loader';

Via CDN (UMD)

<script src="https://unpkg.com/@creaditor/cdtr-loader"></script>
<cdtr-loader size="240"></cdtr-loader>

Attributes

| Attribute | Type | Default | Description | | --------- | ------ | ------- | --------------------------------------------- | | size | number | 400 | Width and height of the loader, in pixels. |

size can also be set as a property (el.size = 240).

Styling

The loader is themed entirely through CSS custom properties, so it drops into light or dark surfaces without touching the markup. Set them on the element (or any ancestor):

cdtr-loader {
  --cdtr-lo-size: 400px;         /* same as the size attribute */
  --cdtr-lo-bg: transparent;     /* stage background */
  --cdtr-lo-card-bg: #ffffff;    /* the "page" being built */
  --cdtr-lo-card-border: #e5e7eb;
  --cdtr-lo-block-bg: #eef2ff;   /* newsletter blocks */
  --cdtr-lo-block-bg-2: #e0e7ff;
  --cdtr-lo-accent: #7c3aed;     /* cursor accents, handles, drop line */
  --cdtr-lo-accent-2: #ec4899;
  --cdtr-lo-accent-soft: #ede9fe;
  --cdtr-lo-cursor: #1f2937;     /* cursor fill */
  --cdtr-lo-radius: 18px;
  --cdtr-lo-duration: 15s;       /* full loop length */
  --cdtr-lo-image-url: url('https://picsum.photos/seed/cdtr-loader/600/360');
}

Override --cdtr-lo-image-url to swap the photo that gets "dropped" onto the page, and --cdtr-lo-duration to speed up or slow down the loop. The dark theme in index.html shows a full override set in context.

Accessibility

The loader renders with role="status" and aria-live="polite" (labelled "Loading"). Under prefers-reduced-motion: reduce the animation is disabled and a static, fully-built newsletter is shown instead. It also forces LTR internally, so it renders identically inside RTL hosts.

License

MIT