Socket
Socket
Sign inDemoInstall

vue-simple-carousel

Package Overview
Dependencies
21
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    vue-simple-carousel

Simple carousel slider for Vue.js 3


Version published
Weekly downloads
27
increased by800%
Maintainers
1
Install size
12.9 MB
Created
Weekly downloads
 

Readme

Source

Simple carousel slider for Vue.js 3

Installation

npm install vue-simple-carousel

or

yarn add vue-simple-carousel

Usage


<template>
  <simple-carousel :items="photos">
    <template #default="{ item, index }">
      <img :src="item" :alt="index">
    </template>
  </simple-carousel>
</template>

<script>
import SimpleCarousel from 'vue-simple-carousel';
import { defineComponent } from 'vue';

export default defineComponent({
  components: {
    SimpleCarousel,
  },
  setup() {
    return {
      photos: [
        'https://via.placeholder.com/150/0000FF/808080?Text=Test%20Image%201',
        'https://via.placeholder.com/150/FF0000/FFFFFF?Text=Test%20Image%202',
        'https://via.placeholder.com/150/FFFF00/000000?Text=Test%20Image%203',
        'https://via.placeholder.com/150/000000/FFFFFF/?text=Test%20Image%204',
      ]
    }
  }
});
</script>

SimpleCarouselContainer props

AttributeTypeDefaultDescription
itemsArrayList of slides (required)
modelValueNumber0Current slide index
perPageNumber / [Number, Number][]*
1*Number of slides per page. :per-page="3" or :per-page=[[640, 2], [720, 3]] for several endpoints
slideByItemBooleanfalseSlide by one item if true, or by full page if false
loopBooleanfalseFlag to make the carousel loop around when it reaches the end.
adjustableBooleanfalseAdjust the height of the wrapper to the height of the visible slides
sideNavBooleanfalseShow side navigation buttons
pagesBooleanfalseShow pages navigation
dotsBooleanfalseShow dots navigation

SimpleCarouselContainer events

Event nameDescriptionParameter
update:modelValueEmitted when current index changedCurrent index Number
change-per-pageEmitted when current per page number changedCurrent per page number Number

Keywords

FAQs

Last updated on 13 May 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc