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

@zeitonline/zon-carousel

v1.0.2

Published

Accessible <zon-carousel> web component with light-DOM slides, controls, dots and autoplay support. Single source of truth for the ZEIT Online carousel.

Downloads

1,051

Readme

@zeitonline/zon-carousel

Accessible <zon-carousel> web component for ZEIT Online. A dependency-free custom element that progressively enhances server-rendered markup with direction buttons, dot controls, autoplay and a gallery pager, following the ARIA APG carousel pattern.

The DOM, CSS and event contract is versioned in CONTRACT.md — read it before changing anything consumers rely on.

Install

npm install @zeitonline/zon-carousel

Peer dependency: @zeitonline/design-system (>=0.4.0 <1), which provides the --z-ds-* tokens the styles use.

Usage

Importing the package registers the element (guarded, safe to import twice):

import '@zeitonline/zon-carousel';

The import does not load CSS. Use either the compiled stylesheet or the SCSS source:

import '@zeitonline/zon-carousel/styles.css';
// needs the node package importer (dart-sass ≥ 1.71, `--pkg-importer=node`)
@use 'pkg:@zeitonline/zon-carousel/styles.scss';
// or, with a plain load path
@use '../node_modules/@zeitonline/zon-carousel/src/zon-carousel';

Markup requires a .zon-carousel__scroll-container; its direct children become slides (wrapped in .zon-carousel__slide unless already wrapped). Canonical markup per variant is in tests/fixtures/.

<zon-carousel>
	<div class="zon-carousel__scroll-container">
		<a href="/a">Slide 1</a>
		<a href="/b">Slide 2</a>
		<a href="/c">Slide 3</a>
	</div>
</zon-carousel>

Load the JS and CSS once per page, from the page that embeds the carousel. HTML/ESI fragments must not ship their own copy: double registration is guarded, duplicate CSS is not.

Attributes

| Attribute | Effect | | ------------------- | -------------------------------------------------------------------------- | | wrapping | Loop navigation around at the first/last slide | | autoplay | Auto-advance with a play/pause control (paused on hover/focus) | | view-mode | continuous advances two at a time and omits dots; single is full-width | | variant | kiosk, shop, merkl, gallery styling/behaviour variants | | overlay-controls | Render direction buttons over the slides | | slide-description | Label noun for slides (default Seite) |

Events (scrolled, autoplay-started, inbound scaling_ready) and the JS-generated classes are documented in CONTRACT.md.

Development

Run nvm use first (.nvmrc is the Node version for development and CI; engines is the looser floor for consumers).

npm install          # also builds via the prepare hook
npm run dev          # rebuild dist/ on change
npm run demo         # interactive demo for manual visual checks
npm run test:install # one-time: install the Playwright browser
npm test             # Playwright contract tests, smoke test, tarball contents
npm run format       # Prettier

Sources: src/zon-carousel.js and src/zon-carousel.scss. The src/_*.scss partials are vendored helpers — re-sync them, don't edit locally (CONTRACT.md §5).

Demo

demo/index.html renders the carousel with real zeit.web CSS and markup, committed under demo/vendor/ and demo/partials/ so it runs without a zeit.web checkout. With a checkout ($ZEITWEB_PATH or ../zeit.web) the dev server recompiles live.

npm run demo:sync          # refresh styles and markup from zeit.web
npm run demo:sync-styles   # styles only (`-- --check` to verify, as CI does)
npm run demo:sync-markup   # markup only

demo/vendor/ is generated — never edit it; review PROVENANCE.json instead. demo/poster.html loads the package in isolation. src/poster.css and src/audio-player.js are demo-only and not published.

Testing in a consumer

npm link ../zon-carousel --no-save   # run in the consumer
npm run dev                          # run here; consumers import dist/

Any npm install in the consumer removes the link. Use npm pack to test the exact published tarball.

Releasing

  1. Merge PRs with a Conventional Commits title: fix: → patch, feat: → minor, feat!: → major. Any change to CONTRACT.md is a major.
  2. release-please keeps a release PR open; merging it bumps the version, updates CHANGELOG.md, tags a release and publishes to npm via trusted publishing (no secrets), gated on the tests.
  3. Renovate opens bump PRs in consumers. Recommended rule:
{
	"matchPackageNames": ["@zeitonline/zon-carousel"],
	"matchUpdateTypes": ["minor", "patch"],
	"groupName": "zon-carousel",
	"schedule": ["at any time"],
	"minimumReleaseAge": null,
	"automerge": true
}