0.2.3 • Published 2 years ago

@radwa-atef/vue-carousel v0.2.3

Weekly downloads
-
License
-
Repository
-
Last release
2 years ago

Carousel

This is a beta version 👩🏼‍💻.

Tags

Vue 2 JavaScript Vue Carousel No Dependencies

⬇️ Installation

npm install @radwa-atef/vue-carousel
yarn add @radwa-atef/vue-carousel

✨ Features

  • Implemented from scratch without external dependencies.
  • More customizable.
  • Support (images, videos, GIF, Custom).
  • Direction (ltr, rtl).
  • Autoplay and Interval time 🕐.
  • Display one or more items per slide.
  • Responsive.

📚 Documentation

GitHub Repository

You can find the source code for this project on GitHub.

👀 Options

Description of your Vue component.

Props

PropTypeRequiredDefaultDescription
contentArraytrue-An array of objects representing the content for each slide. Each object must have value and type properties. The type must be one of: "image", "video", "custom". If type is "custom", the object must also have a component property.
directionStringfalseltrThe text direction of the component. Should be either ltr / rtl.
showDelimitersBooleanfalsetrueFlag to determine whether to show delimiters.
showNavigatorsBooleanfalsetrueFlag to determine whether to show navigators.
hideControlsBooleanfalsefalseFlag to hide controls.
autoplayBooleanfalsetrueFlag to enable autoplay.
intervalNumberfalse5000Interval (in milliseconds) for autoplay.
itemsPerSlideNumberfalse1Number of items to display per slide.

Slots

Slot NameDescription
previous-navigatorSlot for custom content inside the previous navigator. You can customize the appearance based on the isDisabled slot prop.
next-navigatorSlot for custom content inside the next navigator. You can customize the appearance based on the isDisabled slot prop.
delimiterSlot for custom content inside the delimiters. You can customize the appearance based on the activeDelimiter slot prop.

Emits

Emit NameDescription
entity-clickedEmitted when a clickable item is clicked. The emitted event represents the clicked item.

🤩 Usage

<template>
  <div>
    <Carousel
    :content="content"
    @entity-clicked="entityClicked"
    />
  </div>
</template>

<script>
import Carousel from '@radwa-atef/carousel-vue'

export default {
    components: {
        Carousel,
    },

    data() {
        return {
        content:[
        {
        value:"https://wallpapercave.com/wp/wp3194559.jpg", 
        isClickable: true, 
        type: "image"
        },
        {
        value:"https://wallpapercave.com/wp/wp3194559.jpg", 
        isClickable: true, 
        type: "image"
        },
        ]
        }
    },
    methods: {
        entityClicked(item) {
          console.log(item)
        },
    }
}
</script>
0.2.3

2 years ago

0.2.2

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago

0.0.0

2 years ago