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

whitelabel-components

v1.0.0

Published

Framework-agnostic DM whitelabel components (Product Slider + Recipe Slider) — import CSS + JS in any frontend stack

Readme

whitelabel-components

Framework-agnostic Product Slider and Recipe Slider (Swiper). Styles and script are built as separate artifacts so any frontend stack can import them — React, Vue, Angular, Svelte, Astro, or plain HTML.

Install

npm install whitelabel-components

Usage

1. Styles

Import only the components you use:

import 'whitelabel-components/product-slider.css';
import 'whitelabel-components/recipe-slider.css';

whitelabel-components/style.css is an alias for the product slider stylesheet.

Or link the compiled files:

<link rel="stylesheet" href="node_modules/whitelabel-components/dist/product-slider.css">
<link rel="stylesheet" href="node_modules/whitelabel-components/dist/recipe-slider.css">

Sass consumers can pull the source entries (requires node_modules on the Sass load path for Swiper):

@use 'whitelabel-components/product-slider/scss';
@use 'whitelabel-components/recipe-slider/scss';

2. Markup

Product Slider

Render BEM markup with a .js-product-slider hook. Variants:

| Modifier | Behaviour | |---|---| | (default) | Text below image | | .product-slider--text-side | Text beside image (desktop) | | .product-slider--packshots-only | Centered packshots, dynamic bullets, CTA synced to active slide |

Packshot slides may carry:

data-cta-href="…" data-cta-label="…" data-cta-aria-label="…"

Recipe Slider

Render BEM markup with a .js-recipe-slider hook. Variants:

| Modifier | Behaviour | |---|---| | (default) | Image-only slides | | .recipe-slider--image-text | Image + title + text CTA on blue gradient section |

See index.html / Storybook in this repo for full markup examples. Icons and images are not shipped in the package — host them with your project.

3. Script

ESM (both components):

import {
  initProductSliders,
  initRecipeSliders,
} from 'whitelabel-components';

initProductSliders();
initRecipeSliders();

// Or scope to a mounted root (Vue/React/Svelte):
initProductSliders(rootElement);
initRecipeSliders(rootElement);

ESM (single component):

import { initProductSliders } from 'whitelabel-components/product-slider';
import { initRecipeSliders } from 'whitelabel-components/recipe-slider';

CommonJS:

const { initProductSliders, initRecipeSliders } = require('whitelabel-components');
initProductSliders();
initRecipeSliders();

Script tag / CDN-style:

<script src="node_modules/whitelabel-components/dist/product-slider.min.js"></script>
<script src="node_modules/whitelabel-components/dist/recipe-slider.min.js"></script>
<script>
  document.addEventListener('DOMContentLoaded', () => {
    WhitelabelProductSlider.initProductSliders();
    WhitelabelRecipeSlider.initRecipeSliders();
  });
</script>

Swiper is bundled into the JS builds; you do not need to install or import it separately for the default package.

Published files

| Path | Purpose | |---|---| | dist/index.mjs / .cjs / .d.ts | Root barrel — both inits | | dist/product-slider.css | Product Slider styles | | dist/product-slider.mjs / .cjs / .min.js / .d.ts | Product Slider JS (IIFE: WhitelabelProductSlider) | | dist/recipe-slider.css | Recipe Slider styles | | dist/recipe-slider.mjs / .cjs / .min.js / .d.ts | Recipe Slider JS (IIFE: WhitelabelRecipeSlider) |

Local development

npm install
npm run start:server       # SCSS + JS watch + live server
npm run storybook          # Storybook
npm run build:package      # Build publishable dist/
npm run pack:check         # Dry-run npm pack contents

Demo site entries remain src/scss/main.scsscss/ and src/js/functions.jsjs/.

Publish

npm run build:package
npm publish --access public

prepack runs the package build automatically before npm publish / npm pack.