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

coverflow-react-minor-tweaks

v0.1.291

Published

Added a few dynamic overwrites to more easily integrate the carousel in a container

Downloads

11

Readme

Coverflow React

npm version

NPM

npm install --save coverflow-react

Live Demo

https://storage.googleapis.com/coverflow-react/index.html

Demo project

There is a coverflow-react-demo repository on GitHub, that demonstrates features of this widget.

Screenshots

screenshot horizontal screenshot vertical

Usage

Using CoverFlow in your project

  1. Add coverflow-react package to your project using npm.
npm install --save coverflow-react <-- original package and all credits to author...
  1. import CoverFlow
import CoverFlow from 'coverflow-react';
  1. Create an array of path/URLs to the images.
const imagesArr = [
        'img/1.jpg',
        'img/2.jpg',
        'img/3.jpg',
        'img/4.jpg',
        'img/5.jpg'
    ];

(If you are using create-react-app, you can put the images in 'public' directory).

  1. Add CoverFlow Component to your project and pass images array.
<CoverFlow imagesArr={imagesArr} />

Optional props

  • zIndex - by default it is 100. If there are conflicts with z-index in your project. You can pass zIndex you want.
  • height - the height of coverflow container in pixels. The default is 300. The height of coverflow item is calculated automatically. It is 60px less than the height of the container.
  • emptyMessage - a message the user see when there are no items. The default message is 'No items to show.'. This property allows to customize this message. It is particularly useful for internationalization and localization, by allowing coverflow to adapt to different languages.
  • itemRatio - aspect ratio of coverflow items. The default is '8:5'.
  • background - a css background property. The default is 'lightgray'. You can assign any valid css background.
  • border - a css border property. The default is 'none'. You can assign any valid css border.
  • boxShadow - a css box-shadow property. The default is 'none'. You can assign any valid css box-shadow.
  • handleSelect - you can pass a callback function. The function has an index parameter.
<CoverFlow handleSelect={(index)=>{alert(index);}} imagesArr={imagesArr} />
  • labelsArr - allows to add text labels at the bottom of the images, the array must be the same size of imagesArr.
  • direction - the default is "horizontal", if passing "vertical", the CoverFlow will transform to vertical.

Features

  • Support for large amount of images, by rendering only some of them at a time, and with easy navigation and smooth animation, the user can see all the images.
  • Vertical CoverFlow (In addition to Horizontal CoverFlow).

Multiple input devices support

  • Swipe support on touch devices (smartphones, tablets).
  • Keyboard 'left' and 'right' keys support.
  • Scroll support (mouse and trackpad).

Contributing

Opening issues and code contributions are welcomed. See contributing guide.

Credits for images in the demo

Uncopyrited images from Pixabay and Pexels.