JSPM

@dnd-kit/sortable

7.0.0-next-202221523720
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 5708025
  • Score
    100M100P100Q241597F
  • License MIT

Official sortable preset and sensors for dnd kit

Package Exports

  • @dnd-kit/sortable
  • @dnd-kit/sortable/dist/index.js
  • @dnd-kit/sortable/dist/sortable.esm.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@dnd-kit/sortable) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

@dnd-kit/sortable

Stable release

The sortable preset provides the building blocks to build sortable interfaces with @dnd-kit.

Installation

To get started, install the sortable preset via npm or yarn:

npm install @dnd-kit/sortable

Architecture

The sortable preset builds on top of the primitives exposed by @dnd-kit/core to help building sortable interfaces.

The sortable preset exposes two main concepts: SortableContext and the useSortable hook:

  • The SortableContext provides information via context that is consumed by the useSortable hook.
  • The useSortable hook is an abstraction that composes the useDroppable and useDraggable hooks.

The useSortable hook is an abstraction that composes the useDroppable and useDraggable hooks

Usage

Visit docs.dndkit.com to learn how to use the Sortable preset.