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

slide-show-react-kle

v2.0.6-beta

Published

A simple slideshow component built with react that supports simple slide, slideshow picture tag /click, wheel and swipe(mobile event)

Downloads

6

Readme

slide-show-react-kle

Slideshow component click + swipe (mobile event)

NPM JavaScript Style Guide

Installation

Using npm:

npm install --save slide-show-react-kle

Node:

Import your css files or makeStyles

const makeStyles = {
    class: { // .class_randomValue { /* styles */ }
      color: 'white',
    },
    left_arrow: { // .left_arrow_ba7gh {  color: white; }
      color: 'white',
    },
    'section_wraper::after':{ //.section_wraper_ba7gh::after { /* styles */ }
    },
    '/left_arrow': { // .left_arrow { box-sizing: border-box; }
      boxSizing: 'border-box',
    },
    '?h3': { // h3 {  z-index: 9,; }
       zIndex: 9,
    },
    '/left_arrow:hover': { // .left_arrow:hover : {/* styles */}
    },
    '?a:visited': { // a:visited { /*styles */}
    },
     '@keyframes name': `{0%{tranform: translateX(10px)}, 100%{}}`,

Slideshow BanhMy

import { BanhMy } from 'slide-show-react-kle';
  const App = () => {
    return (
      <div>
        <BanhMy >
          {yourData.map((items) => (
            // your item //
          ))}
        </BanhMy>
      </div>
    );
  };
export default App;

Examplpe

Demo

const App = () => {
  const styles = {
    right_arrow: {
      color: 'white',
    },
    '/div_item': {
      display: 'flex',
      justifyContent: 'center',
      alignItems: 'center',
      position: 'relative',
    },
    '?h3': {
      fontSize: '2.5rem',
      color: 'white',
      margin: '5px 0',
    },
    '?a.a_link:visited': {
      color: '#cdcbcb',
    },
  };
  return (
    <div>
      <BanhMy style={styles}>
        {data.map((item, index) => (
          // html
        ))}
      </BanhMy>
    </div>
  );
};
export default App;

Output:

PropTypes

  time: timeOut to next slide //default 5000ms
  style: makeStlyes,
  prevBtn: change icon prev button,
  nextBtn: change icon next button,
  getActive: callback function return active value,
  disableWheel: disable whell event //defualt false

Slideshow BanhBo

Example

Demo

import { BanhMy } from 'slide-show-react-kle';
const App = () => {
  const styles = {
    ///////
  };
  return (
    <div>
      <BanhBo style={stylesBanhMy} slash="|">
        {data.map((item, index) => (
          //html, ex:
          <div key={index} className="item">
            <img className="item__img" src={item.img} alt="img"></img>
          </div>
        ))}
      </BanhBo>
    </div>
  );
};
export default App;

Output:

PropTypes

  time: timeOut to next slide //default 5000ms
  style: makeStlyes,
  prevBtn: change icon prev button,
  nextBtn: change icon next button,
  slash: //defualt '/'
  getActive: callback function return active value,
  disableWheel: disable whell event //defualt false

Slideshow BanhTieu

Example

Demo

import { BanhTieu } from 'slide-show-react-kle';
  <BanhTieu >
        {data.map((item, index) => (
          ///html
        ))}
      </BanhTieu>

PropTypes

  time: timeOut to next slide //default 5000ms
  style: makeStlyes,
  prevBtn: change icon prev button,
  nextBtn: change icon next button,
  getActive: callback function return active value,
  disableWheel: disable whell event //defualt false

Slideshow Pho

Example

Demo

import React from 'react';

import {  Pho } from 'slide-show-react-kle';
const App = () => {
  const data = [{
  {
    img: 'https://picsum.photos/1024/767',
    title: 'Slide 1',
    desc: 'Lorem ipsum dolor sit amet consectetur adipisicing elit. Molestias, fugiat quasi aut earum id quos quam voluptas, adipisci mollitia, voluptates dolore aperiam unde nihil. Exercitationem ipsum culpa quam maiores aliquid!',
    link: '#',
  },
  }]
  return (
      <Pho data={data} />
  );
};
export default App;

PropTypes

  data: array.isRequired,
  time: timeOut to next slide //default 5000ms
  style: makeStyles,
  prevBtn: change icon prev button,
  nextBtn: change icon next button,
  customATag: true to replace a tag , //defualt false
  textContentATag: replace text content of a tag // defualt 'View'
  disableWheel: disable whell event //defualt false

Simple Slide

You need to import the data, let try

import React from 'react'
import {SlideSimple} from 'slide-show-react-kle'

class Example extends Component {
  const images = [
{
    image: 'https://picsum.photos/1280/720',
    title: 'img1',
    name: 'image 1',
    infor:
      'Lorem ipsum dolor sit amet consectetur adipisicing elit. Molestias, fugiat quasi aut earum id quos quam voluptas, adipisci mollitia, voluptates dolore aperiam unde nihil. Exercitationem ipsum culpa quam maiores aliquid',
    link: '#',
    value: 'View',
  },
  ]
  render() {
    return <SlideSimple data={images}  style={style}/>
  }
}

Simple Slide- Customize Css

You can customize css


import React from 'react'
import {SlideSimple} from 'slide-show-react-kle'

class Example extends Component {
  // add  css //
  const style = {
    carousel: {
      marginLeft: '20px',
      marginRight: '20px'
    }
    carousel_img : {
    }
  }
  const images = {
  }
  render() {
    return <SlideSimple data={images}  style={style}/>
  }
}

Slide-Picture

What is a Picture Tag ? Use them to control when your layout can be adapted at a particular viewport or device size. Import your data You can customize css, prev/next button

import React from 'react'
import {Slide} from 'slide-show-react-kle'

class Example extends Component {
  const images = [
 {
    xs: 'https://picsum.photos/576/768',
    sm: 'https://picsum.photos/768/576',
    md: 'https://picsum.photos/960/640',
    lg: 'https://picsum.photos/1024/768',
    xl: 'https://picsum.photos/1280/768',
    xxl: 'https://picsum.photos/1920/1080',
    title: 'img1',
    name: 'image 1',
    infor:
      'Lorem ipsum dolor sit amet consectetur adipisicing elit. Molestias, fugiat quasi aut earum id quos quam voluptas, adipisci mollitia, voluptates dolore aperiam unde nihil. Exercitationem ipsum culpa quam maiores aliquid',
    link: '#',
    value: 'View',
  },
  ]
  render() {
    return <Slide data={images} style={...} btnPrev={...}/>
  }
}

License

MIT © phamqi