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-cat-carousel

v0.9.3-6

Published

vue-cat-carousel is a slider component of Vue.js.

Downloads

72

Readme

🐱🐱🐱 Vue-Cat-Carousel 🐱🐱🐱

Simple, customizable, reactive and lightest Carousel

Install

npm i -S vue-cat-carousel
or
npm install --save vue-cat-carousel

Preview

Desktop Preview

Mobile Preview

Usage

Plugin install:

Global install

import Vue from 'vue'
import CatCarousel from 'vue-cat-carousel'

Vue.use(CatCarousel)

Local install

components: {
  CatCarousel: () => import('vue-cat-carousel')
}

How to use it in HTML

<cat-carousel
    :items="items"
    :item-per-page="5"
    :indicators-config="{activeColor: '#000', size: 10, color: '#d1d1d1', hideIndicators: false}"
  >
    <template
      slot="item"
      slot-scope="{data, index}"
    >
      <div class="item">{{index}} {{data.name}} </div>
    </template>
  </cat-carousel>
import { CatCarousel } from 'vue-cat-carousel'

new Vue({
  el: 'body',
  components: {
    CatCarousel
  },
  data() {
    return {
      items: [{name: 'hans'}, {name: 'sagita'}]
    }
  }
})

Props

Slider:

| name | type | default | description | | --------------- | -------------------------------- | ---------- | ---------------------------------------------------------------------- | | items | list | [] | List of items in loop | | item-per-page | number | 5 | List of items in one page | | centerMode | Object | CENTER_MODE_DEFAULT_CONFIG | Allow to center carousel item with partial prev/next slides | | indicators-config | Object | INDICATORS_DEFAULT_CONFIG | define carousel indicators item size |

INDICATORS_DEFAULT_CONFIG

property | type | value | description --- | --- | --- | --- size | number | 16 | size of indicators in pixel color | string | '#d6d6d6' | color of indicators (hex, rgb, etc) activeColor | string | '#0095da' | color of active indicator (hex, rgb, etc) hideIndicators | boolean | false | show and hide carousel indicators prefix | string | '' | add prefix for :key item name

INDICATORS_DEFAULT_CONFIG

property | type | value | description --- | --- | --- | --- enabled | boolean | false | enable center mode carousel paddingCenter | number | 10 | sizes of padding in percentage

Slots

slot | slot-scope | description --- | --- | --- item | data, index | customize the design of carousel item prev-navigation | prev | customize slide left navigation next-navigation | next | customize slide right navigation

Previous navigation:

<cat-carousel
    :items="items"
    :item-per-page="5"
    :indicators-config="{activeColor: '#000', size: 10, color: '#d1d1d1', hideIndicators: false}"
  >
    <template
      slot="prev-navigation"
      slot-scope="{prev}"
    >
      <div class="custom-navigation" @click="prev"></div>
    </template>
  </cat-carousel>

Next navigation:

<cat-carousel
    :items="items"
    :item-per-page="5"
    :indicators-config="{activeColor: '#000', size: 10, color: '#d1d1d1', hideIndicators: false}"
    :prefix="'nike'"
  >
    <template
      slot="prev-navigation"
      slot-scope="{next}"
    >
      <div class="custom-navigation" @click="next"></div>
    </template>
  </cat-carousel>

Center mode carousel:

<cat-carousel
    :items="items"
    :item-per-page="5"
    :centerMode="{enabled: true, paddingCenter: 10}"
    :indicators-config="{activeColor: '#000', size: 10, color: '#d1d1d1', hideIndicators: false}"
  >
  </cat-carousel>

License

MIT