0.6.10 β€’ Published 2 days ago

vue-fluid-dnd v0.6.10

Weekly downloads
-
License
-
Repository
github
Last release
2 days ago

npm bundle size license version GitHub issues GitHub stars twitter test_coverage

A fluid, smooth and versatil drag and drop library for lists on Vue3. It's a lightweight tool ~5 Kb (gzip) with no depenencies.

✨ Features

  • βœ… Fully customizable 🎨.
  • βœ… Zero dependencies πŸͺΆ.
  • βœ… Work with horizontal➑️and vertical list :arrow_down:.
  • βœ… Mouse 🐭 and touch πŸ‘‰πŸ“± (mobile, tablet and so on) support.
  • βœ… Nice documentation πŸ“‘ and examples.
  • βœ… Fully tested πŸ§ͺ, typed and reliable.

πŸš€ Getting Started

  1. Install vue-fluid-dnd:

    # with npm:
    npm i vue-fluid-dnd
    
    # with yarn:
    yarn add vue-fluid-dnd
    
    # with pnpm:
    pnpm i vue-fluid-dnd
  2. Import the vue composable

    import { useDragAndDrop } from "vue-fluid-dnd";
  3. Create a list that your want to sort an use useDragAndDrop

    // Each element have its own styles or classes and the draggable-id
    const listToSort = ref([
      {
        number: 1,
        style:
          "color: white; background-color: red; width: 50px; margin: 23px 0;",
      },
      //...
    ]);
    // create the parent element and set drag and drop configuration on the parent and children elements (creating events, statees, styles, etc) calling useDragAndDrop composable
    const { parent } = useDragAndDrop(listToSort);
  4. Create childrens

    <template>
       <div ref="parent" style="width: 40%; display: block">
          <div
             v-for="(element, index) in listToSort"
             :index="index"
             :style="element.style"
          >{{ element.number }}
          </div>
       </div>
    </template>
  5. Documentation

  • πŸ“š Check out all the docs.
  • πŸ› οΈ Edit the previous here.
  • πŸ“˜ See others examples here.

🀝 Contributing

If you're interested in contributing to vue-fluid-dnd, please read our contributing docs before submitting a pull request CONTRIBUTING.

πŸ”‘ License

0.6.10

2 days ago

0.6.9

28 days ago

0.6.8

28 days ago

0.6.7

1 month ago

0.6.6

1 month ago

0.6.5

1 month ago

0.6.3

1 month ago

0.6.4

1 month ago

0.6.2

1 month ago

0.6.1

1 month ago

0.5.3

2 months ago

0.6.0

2 months ago

0.5.2

2 months ago

0.5.1

2 months ago

0.5.0

2 months ago

0.4.12

2 months ago

0.4.10

2 months ago

0.4.11

2 months ago

0.4.9

3 months ago

0.4.8

3 months ago

0.4.7

3 months ago

0.4.6

3 months ago

0.4.5

3 months ago

0.4.4

3 months ago

0.1.25

3 months ago

0.1.26

3 months ago

0.1.28

3 months ago

0.4.1

3 months ago

0.4.3

3 months ago

0.4.2

3 months ago

0.1.20

3 months ago

0.1.21

3 months ago

0.1.22

3 months ago

0.1.23

3 months ago

0.1.19

3 months ago

0.1.18

3 months ago

0.1.17

3 months ago

0.1.16

3 months ago

0.1.15

3 months ago