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

vue-directional-carousel

v0.1.4

Published

This is a Vue 3 component that allows you to set the direction of image movement not only vertically and horizontally but also in different directions (left, right, up, down).

Downloads

28

Readme

vue-directional-carousel

This is a Vue 3 component that allows you to set the direction of image movement not only vertically and horizontally but also in different directions (left, right, up, down).

Installation

You can install the vue-directional-carousel package via npm or yarn:

npm install vue-directional-carousel

or

yarn install vue-directional-carousel

Usage

  • Import the VueDirectionalCarousel component in your Vue.js project:
import DirectionalCarousel from 'vue-directional-carousel'
  • Register the VueDirectionalCarousel component locally in your component:
// if use options api
export default {
  components: {
    DirectionalCarousel
  }
}
  • Use the vue-directional-carousel component in your template:
<template>
  <div>
    <directional-carousel
      :items="imageList"
      :show-prev="true"
      :show-next="true"
      :interval="2000"
      direction="down"
      width="100%"
      height="200px"
    />
  </div>
</template>
<script setup>
  import DirectionalCarousel from 'vue-directional-carousel'

  // Define your carousel image here
  const imageList = [
     'src/assets/sample1.png',
     'src/assets/sample2.png',
     'src/assets/sample3.png',
     'src/assets/sample4.png',
     'src/assets/sample5.png',
     ...
  ]
</script>

Props

| props | type | isRequired | default | description | | -------------------- | ----------------------------------- | ---------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | items | string[] | { src: string}[] | Required | | List of images to be used in the carousel. | | width | string | Optional | '100%' | Width of the carousel. | | height | string | Optional | '300px' | Height of the carousel. | | direction | 'left' | 'right' | 'up' | 'down' | Optional | 'right' | Direction in which the images flow. | | duration | number | Optional | 1000 | Duration of each slide (shorter values make it faster). | | interval | number | Optional | 0 | Auto slide interval for images (in ms). Set to 0 to disable auto sliding. | | pauseAutoplayOnHover | boolean | Optional | false | When auto slide is enabled, pause the slide when the mouse is over an image. Resume auto slide when the mouse is moved outside the carousel area. | | showPrev | boolean | Optional | true | Show previous button. | | showNext | boolean | Optional | true | Show next button. | | showDots | boolean | Optional | true | Show buttons indicating the current image sequence. Click to slide to the corresponding image. |

Events

추후 기능 추가 예정

Slots

item

Use Slot 'item' in your component:

const items = ref([
  {
    title: "제목1",
    url: "google.com",
  }, {
    title: "제목2",
    url: "ahnlab.com",
  },
]);

<DirectionalCarousel
    :items="items"
    direction="down"
    height="50px"
    width="400px"
    :show-next="true"
    :show-prev="true"
    :interval="2000"
    :pause-autoplay-on-hover="true"
  >
    <template #item="item">
      <div :style="{ backgroundColor: 'white', color: 'black', height: '100%', width: '100%' }">
        {{ item.title }} / {{ item.url }}
      </div>
    </template>
  </DirectionalCarousel>

Contributing

License

MIT