![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@types/sortablejs
Advanced tools
TypeScript definitions for 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.
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'
});
react-beautiful-dnd is a drag-and-drop library for React applications. It provides a higher-level abstraction compared to SortableJS and is designed specifically for React, making it easier to integrate with React components.
dragula is a drag-and-drop library that focuses on simplicity and ease of use. It provides a straightforward API for creating sortable lists and grids, but it lacks some of the advanced features and customization options available in SortableJS.
interactjs is a versatile library for drag-and-drop, resizing, and multi-touch gestures. It offers more comprehensive functionality beyond just sorting, making it suitable for more complex interactions. However, it may be overkill for simple sortable lists.
npm install --save @types/sortablejs
This package contains type definitions for sortablejs (https://github.com/RubaXa/Sortable).
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/sortablejs.
These definitions were written by Maw-Fox, Maarten Staa, and Wayne Van Son.
FAQs
TypeScript definitions for sortablejs
The npm package @types/sortablejs receives a total of 373,885 weekly downloads. As such, @types/sortablejs popularity was classified as popular.
We found that @types/sortablejs demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.