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

react-stacker

v1.0.0

Published

3d stacked content swiper/carousel component for React.js

Downloads

5

Readme

react-stacker

Carousel / slider component built with React.js. It’s flexible, fast and touch-friendly.

Imgur

Examples

  • To check out live examples visit https://dmitrymorozoff.github.io/react-stacker/

Getting started

Install react-stacker using npm.

npm install --save react-stacker

or if you prefer yarn

yarn add react-stacker

Usage

import React from "react";
import ReactDOM from "react-dom";
import { StackerSlide, StackerSlider } from "react-stacker";

export class App extends React.Component {
    onChangeHandler = value => {
        console.log("On change slide");
    };

    onPrevChangeHandler = event => {
        console.log("On prev change slide");
    };

    onNextChangeHandler = event => {
        console.log("On next change slide");
    };

    render() {
        const { value } = this.state;
        return (
            <StackerSlider
               dots={true}
                infiniteLoop={true}
                onChange={this.onChangeHandler}
                onPrevChange={this.onPrevChangeHandler}
                onNextChange={this.onNextChangeHandler}
            >
                <StackerSlide>
                    Slide 6/6
                </StackerSlide>
                <StackerSlide>
                    Slide 5/6
                </StackerSlide>
                <StackerSlide>
                    Slide 4/6
                </StackerSlide>
                <StackerSlide>
                    Slide 3/6
                </StackerSlide>
                <StackerSlide>
                    Slide 2/6
                </StackerSlide>
                <StackerSlide>
                    Slide 1/6
                </StackerSlide>
            </StackerSlider>
        );
    }
}

ReactDOM.render(<App />, document.getElementById("root"));

Props

| Props | Type | Default | Description | | ------------------ | ------- | ----------- | ----------------------------------------------------------------------------- | | className | string | - | - | | zDistance | number | 50 | Distance between slides by z axis | | yDistance | number | 30 | Distance between slides by y axis | | transitionDuration | number | 0.8 | Slide transition speed. Number of milliseconds accepted. | | infiniteLoop | boolean | true | Flag to make the carousel loop around when it reaches the end. | | dots | boolean | false | Flag to render pagination component. | | dotsColor | string | #0000007d | The fill color of pagination dots. Any valid CSS color is accepted | | dotsActiveColor | string | #ff0000 | The fill color of the active pagination dot. Any valid CSS color is accepted. | | dotsSize | string | 8px | The size of each pagination dot. Pixel values are accepted. | | dotsPadding | string | 6px | The padding inside each pagination dot. Pixel values are accepted. | | slideWidth | string | - | Weight of the slides. | | slideHeight | string | - | Height of the slides. |

Events

| Event | Type | Emitter | | ------------ | -------- | -------- | | onChange | function | carousel | | onPrevChange | function | carousel | | onNextChange | function | carousel |

Contributing

  • For bugs and feature requests, please create an issue
  • Lint and test your code
  • Pull requests and ⭐ stars are always welcome

Raising issues

When raising an issue, please add as much details as possible. Screenshots, video recordings, or anything else that can make it easier to reproduce the bug you are reporting.

License

This project is licensed under the MIT License