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

@live-components/image-slider

v0.1.0

Published

An HTML Web Component

Downloads

2

Readme

<image-slider>

A Simple ESM Image Slider Web Component

Developer Experience

Image Slider

  • install as an HTML Script Tag
  • very small byte size over the wire > 3.1kb
  • optimal content compression > brotli (gzip for nomodule js)
  • excellent browser support
    • IE11 (nomodule-only basic css)
    • full support for the last 2 versions of Safari, Edge, Firefox, Mobile Safari, Chrome
  • minimal developer tooling
    • Qunit (unit testing)
    • bread-compressor cli (for gzip and br)
    • SkyPack CDN via NPM (distribution)*
  • Indirect SSR Support
    • minimal HTML boilerplate (HTML slots plus wrapper)
    • JS not loaded on server and HTML is identical on server and browser

(*) Unpkg and AWS S3/Cloudfront (plus some tooling) are other alternative distribution method as well.

Requirements

  • a target application that supports HTML, JS, and CSS

Terminology

| term | definition | resources | | --- | --- | --- | | Web Component | A native 1st class browser HTML node built with a combination of Custom Elements, Shadow DOM, and HTML Template tags | webcomponents.org | | Custom Element | A custom & native 1st Class browser HTML element complete with lifecycyle methods and a constructor | Using Custom ELements | | Shadow DOM | Native encapulation for HTML on a page similar to DOM Fragments or IFrames | | | Shadow Root | The reference container for a given Shadow DOM instance |Using Shadow DOM | | Slot | Transclusion HTML Nodes for Shadow DOM that live in the 'Light' DOM but are slotted into the Shadow DOM | Slot usage, Slots and Template Tags | | Custom Properties (AKA CSS Variables) | scoped CSS values that can pierce through Shadow DOM | Using Custom Properties | | Custom Events | Events that are developer created and typically pass data to the evt object | Creating and triggering Custom Events |