1.0.3 • Published 2 years ago

vue3-list-shuffle v1.0.3

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

vue3-list-shuffle

Lightweight, easy to use component for animated shuffling and change order in lists

Vue list shuffle.webm

Demo

Live Demo

Installation

# with npm
npm install vue3-list-shuffle
# with yarn
yarn add vue3-list-shuffle

Basic usage

import VueListShuffle from 'vue3-list-shuffle';
    <vue-list-shuffle
      :shuffle="shuffle"
      :restore-order="restoreOrder"
      :duration="3"
    >
      <div v-for="item in 5" :key="item" class="list-item">
        ITEM: {{ item }}
      </div>
    </vue-list-shuffle>
    
    <style scoped>
     .list-item {
        background: #B08620;
        font-size: 3rem;
        padding: 1.5rem;
        border: solid 1px;
        color: #FEF0CD;
      }
    <style>

Props

NAMETYPEDEFAULTDESCRIPTION
idStringlistWrapperComponent id
durationNumber1Animation duration (sec)
shuffleString, Number, BooleanDate.now()Change this prop for calling shuffling
shuffleOnInitBooleanfalseIf true, shuffles list on first init
restoreOrderString, Number, BooleanDate.now()Change this prop for restoring initial list order

Events

NAMEPARAMS TYPEDESCRIPTION
shufflednumber[]Fires after shuffling is finished. Returns array with list items indexes on new positions.
1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago