
Security News
Open VSX Unblocks Extension IDs Used in Malware Campaign
Open VSX has removed three extension IDs from its malicious-extension list as the legitimate publishers they impersonated move to claim the names for themselves.
@neodrag/solid
Advanced tools
A lightweight SolidJS library to make your elements draggable.
createDraggable, createDroppable, createSortable follow Solid naming (create* / with*)() => plugins; the wrapper reconciles automaticallynpm install @neodrag/solid@next
Basic usage
import { createDraggable } from '@neodrag/solid';
export const App: Component = () => {
const [draggableRef, setDraggableRef] =
createSignal<HTMLElement | null>(null);
createDraggable(draggableRef);
return <div ref={setDraggableRef}>You can drag me</div>;
};
With plugins
import { createDraggable, axis, grid } from '@neodrag/solid';
export const App: Component = () => {
const [draggableRef, setDraggableRef] =
createSignal<HTMLElement | null>(null);
createDraggable(draggableRef, [axis('x'), grid([10, 10])]);
return <div ref={setDraggableRef}>Horizontal grid snapping</div>;
};
Defining plugins elsewhere with TypeScript
import {
createDraggable,
axis,
bounds,
BoundsFrom,
type Plugin,
} from '@neodrag/solid';
export const App: Component = () => {
const [draggableRef, setDraggableRef] =
createSignal<HTMLElement | null>(null);
const plugins: Plugin[] = [axis('y'), bounds(BoundsFrom.parent())];
createDraggable(draggableRef, plugins);
return <div ref={setDraggableRef}>Type-safe dragging</div>;
};
Getting drag state
import { createDraggable } from '@neodrag/solid';
export const App: Component = () => {
const [draggableRef, setDraggableRef] =
createSignal<HTMLElement | null>(null);
const dragState = createDraggable(draggableRef);
createEffect(() => {
console.log('Position:', dragState().offset);
console.log('Is dragging:', dragState().isDragging);
});
return (
<div ref={setDraggableRef}>Check console while dragging</div>
);
};
Reactive plugins with reactive plugin factories
import { createSignal } from 'solid-js';
import { createDraggable, axis } from '@neodrag/solid';
export const App: Component = () => {
const [draggableRef, setDraggableRef] = createSignal<HTMLElement | null>(null);
const [currentAxis, setCurrentAxis] = createSignal<'x' | 'y'>('x');
createDraggable(draggableRef, [axisreactive plugin factories]);
return (
<div>
<div ref={setDraggableRef}>Current axis: {currentAxis()}</div>
<button onClick={() => setCurrentAxis(currentAxis() === 'x' ? 'y' : 'x')}>Switch Axis</button>
</div>
);
};
import { createSortable, createSortableItem } from '@neodrag/solid/sortable';
const { list, dropRef } = createSortable({
items,
keyBy: (i) => i.id,
onReorder: setItems,
});
// <ul ref={dropRef}> … createSortableItem(list, item.id) per row
Inspired by react-draggable, but with a modern plugin architecture and optimized for performance.
MIT License © Puru Vijay
FAQs
SolidJS library to add dragging to your apps 😉
We found that @neodrag/solid demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.

Security News
Open VSX has removed three extension IDs from its malicious-extension list as the legitimate publishers they impersonated move to claim the names for themselves.

Product
Socket’s PHP and Composer support is now in Beta for all customers, with PHP reachability analysis generally available.

Product
Socket is bringing experimental protection to Firefox, scanning 97,000+ extensions in Mozilla's official directory for malware and risky updates.