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

product-slide

v2.1.2

Published

A customizable product slider component for React

Downloads

3

Readme

Product Slide

A highly customizable and accessible React component for displaying product image slides with zoom and thumbnail navigation. Ideal for e-commerce and product showcase applications.

| Horizontal | Vertical| | :-------- | :------- | | | |

📖 Table of Contents


🚀 Features

  • 📸 Display multiple product images
  • 🔍 Image zoom on hover
  • 📎 Customizable thumbnail navigation
  • ↔️ Horizontal or vertical orientation
  • 🎛 Fully configurable styles and behaviors
  • 🎯 Keyboard navigation (left/right arrows)
  • ♿️ Accessible markup with ARIA attributes

📦 Installation

npm install product-slide

🔧 Usage

import ProductSlide from "product-slide";
import "product-slide/style.css"; // Import the default styles

const images = [
  "/images/product1.jpg",
  "/images/product2.jpg",
  "/images/product3.jpg",
];

function App() {
  return (
    <ProductSlide
      images={images}
      settings={{
        direction: "horizontal",
        zoom: true,
        thumbnailPosition: "bottom",
        transitionDuration: 300,
      }}
    />
  );
}

Alternative Import Methods

// Named import
import { ProductSlide } from "product-slide";
import "product-slide/style.css";

// Or import CSS separately
import ProductSlide from "product-slide";
import "product-slide/style.css";

🛠 Props

| Prop | Type | Description | | ---------------------------- | ----------------------- | ------------------------------------- | | images | string[] (required) | Array of image URLs to display | | settings | object | Configuration object (see below) | | className | string | Custom class for root wrapper | | style | object | Custom inline styles for root wrapper | | mainImageWrapperClassName | string | Class for the main image wrapper | | mainImageWrapperStyle | object | Style for the main image wrapper | | mainImageClassName | string | Class for the main image | | mainImageStyle | object | Style for the main image | | zoomedImageClassName | string | Class for zoomed overlay | | zoomedImageStyle | object | Style for zoomed overlay | | thumbnailsWrapperClassName | string | Class for thumbnail wrapper | | thumbnailsWrapperStyle | object | Style for thumbnail wrapper | | thumbnailClassName | string | Class for each thumbnail | | thumbnailStyle | object | Style for each thumbnail | | activeThumbnailClassName | string | Class for active thumbnail | | activeThumbnailStyle | object | Style for active thumbnail | | onSlideChange | function | Callback triggered when slide changes |

Settings Object

| Key | Type | Default | Description | | -------------------- | ---------------------------------------- | -------------- | --------------------------- | | direction | "horizontal" \| "vertical" | "horizontal" | Layout direction | | zoom | boolean | true | Enable/disable zoom feature | | thumbnailPosition | "top" \| "bottom" \| "left" \| "right" | "bottom" | Thumbnail placement | | transitionDuration | number | 300 | Transition time in ms |

💡 Examples

<ProductSlide
  images={["/img1.jpg", "/img2.jpg"]}
  settings={{ direction: "vertical", zoom: false }}
  mainImageClassName="custom-main-img"
  thumbnailClassName="thumb-img"
/>

🧯 Troubleshooting

  • Images not showing: Ensure valid URLs and that the images prop is correctly passed.
  • Zoom not working: Check if settings.zoom is set to true and your image is large enough to zoom.
  • Keyboard navigation not working: Make sure the component is focusable (tab index is set).

License

MIT

We hope you find product-slide useful for creating visually appealing and interactive product sliders in your React applications!