Socket
Socket
Sign inDemoInstall

@types/sortablejs

Package Overview
Dependencies
Maintainers
1
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/sortablejs

TypeScript definitions for sortablejs


Version published
Weekly downloads
298K
increased by9.77%
Maintainers
1
Weekly downloads
 
Created

Package description

What is @types/sortablejs?

@types/sortablejs provides TypeScript type definitions for the SortableJS library, which is a JavaScript library for creating sortable lists and grids using native drag-and-drop functionality.

What are @types/sortablejs's main functionalities?

Basic Sortable List

This feature allows you to create a basic sortable list. By initializing Sortable on a DOM element, you can enable drag-and-drop sorting for its child elements.

import Sortable from 'sortablejs';

const el = document.getElementById('items');
const sortable = Sortable.create(el);

Custom Drag Handle

This feature allows you to specify a custom drag handle. Only elements matching the selector specified in the 'handle' option will be draggable.

import Sortable from 'sortablejs';

const el = document.getElementById('items');
const sortable = Sortable.create(el, {
  handle: '.handle'
});

Sortable with Animation

This feature enables animation during sorting. The 'animation' option specifies the duration of the animation in milliseconds.

import Sortable from 'sortablejs';

const el = document.getElementById('items');
const sortable = Sortable.create(el, {
  animation: 150
});

Group Sorting

This feature allows you to enable sorting between multiple lists. By setting the same 'group' option for multiple Sortable instances, items can be dragged between these lists.

import Sortable from 'sortablejs';

const el1 = document.getElementById('items1');
const el2 = document.getElementById('items2');

const sortable1 = Sortable.create(el1, {
  group: 'shared'
});
const sortable2 = Sortable.create(el2, {
  group: 'shared'
});

Other packages similar to @types/sortablejs

Readme

Source

Installation

npm install --save @types/sortablejs

Summary

This package contains type definitions for sortablejs (https://github.com/RubaXa/Sortable).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/sortablejs.

Additional Details

  • Last updated: Wed, 22 Nov 2023 00:24:48 GMT
  • Dependencies: none

Credits

These definitions were written by Maw-Fox, Maarten Staa, and Wayne Van Son.

FAQs

Package last updated on 22 Nov 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc