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

sliderproject

v1.0.21

Published

A Vue.js project

Downloads

1

Readme

sliderproject

A Vue.js project

Update - 2018-07-13

i have made this project to be more generic.

Below are the notable details

Note 1:

You can now integrate this slider component into your project by just copying the slider folder into your project.

You should pass 2 inputs to this slider component

  • images
    • Array of JSON object
    • You can pass 'n' number of objects to this.
    • Please note that the id object inside the images array must start with 0 and it has to increment from there
    • Below is the sample array
      images : [
          {
              id: 0,
              url : "/images/image1.jpg",
              title: "Lightning"
          },
          {
              id: 1,
              url : "/images/image2.jpg",
              title: "Batman on the roof"
          }
      ]
  • slideDuration
    • Specify the value in millisecond (4000 is 4s, 5000 is 5s)
    • Amount of time after which the slider has to move to the next slide automatically

Note 2

i have added SCSS package in this module. SCSS transpilers will automatically get downloaded when you install this npm package.

i have provided scss variables, so that you can make changes to font-size,background-color,font-color,height,width ...etc according to your project need.

i have made size calculation based on pixels, you can see it in the scss variables. If you need it change it to rem or em, you can just make changes in the scss variables, i have tried to make the code to adapt to changes in sizes. if you face any issue while making these changes , let me know.

Below is the npm command to install scss compiler into vuejs

    npm install sass-loader node-sass style-loader --save

Note 3

i have introduced pause and play controls in image slider

► - unicode symbol which denotes Play slider

❚ - unicode symbol which denotes Pause slider

This unicode may not work in some browsers, You could face browser compatibility issues. i'd recommend you to first run this on chrome and verify if this module suits your requirement and then move to a different browser.

Feel free to use any icons or images for pause and play elements. In Slider.vue file there are two classes already defined.

.play{
    color: brown;
}
.pause{
    color: #580843;
}

You can introduce any icons or images into it. i will leave it to you.

Note 4

Setting up this project

i'd recommend you to use it as local component. You have to specificy the height & width of the slider in the container element of the <Slider ...> component.

In the below code sample, .slidercontainer class is the container element for the <Slider ...> component. So you SHOULD to specify the height & width of the image slider in this class.

//for full screen image slider
.slidercontainer{
    height:100vh;
    width:100%;
}

//image slider with less height and full width
.slidercontainer{
    height:400px;
    width:100%;
}

//image slider with less height and less width
.slidercontainer{
    height:400px;
    width:600px;
}

Code sample

    <template>
        <div class="slidercontainer">
            <Slider :images="images" :intervalDuration="slideDuration"/>
        </div>
    </template>
    <script>
        import Slider from "vue-slider-rw";
        export default {
            components :{
                Slider
            },
            data () {
                return {
                    images : [
                        {
                            id: 0, url : "/images/image1.jpg", title: "Lightning"
                        },
                        {
                            id: 1, url : "/images/image2.jpg", title: "Batman on the roof"
                        }
                    ],
                    slideDuration : 4000
                }
            }
        }
    </script>
    <style>
        .slidercontainer{
            height:100vh;
            width:100%;
        }
    </style>

Sample Project

You can download my project from git and see how it works. i have given all the input datas in it. You just have to download the project -> set it up -> run

You can find me on twitter @divine_rw