effdnd

0

Описание

Self-confident Drag and Drop

Языки

  • TypeScript98,1%
  • JavaScript1,9%
9 месяцев назад
9 месяцев назад
2 месяца назад
2 месяца назад
2 месяца назад
2 месяца назад
2 месяца назад
9 месяцев назад
2 месяца назад
9 месяцев назад
README.md

effdnd

EffDND

license npm latest package minified size minzipped size install size

EffDnD is a self-confident Drag and Drop library based only on the browser APIs.

Some features

  • lightweight
  • zero-dependency
  • framework agnostic
  • touch events support
  • customizable styles

Examples

Installation

Type in your terminal:

Quick start

In short,

effdnd
uses two custom web component:

  • effdnd trigger
    is triggerring drag-and-drop,
  • effdnd-actor
    indicates the areas of the layout that will participate in the drag-and-drop process (play their roles).

The web component

effdnd-actor
can "play" several roles:

  • item
    - the item being moved.,
  • target
    - the target of the move,
  • scope
    - movement boundaries.

To define both web components, simply call the

useDnD
function, and use the results of the call to create event listeners

That's all. Enjoy simplicity.