
Security News
GPT-6 Astra Attempts Supply Chain Attacks Against Open Source Maintainers in Testing
GPT-6 Astra hits 100% on ExploitBench and finds zero-days autonomously, while independent tests reveal scope violations and monitoring gaps.
@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 😉
The npm package @neodrag/solid receives a total of 300,119 weekly downloads. As such, @neodrag/solid popularity was classified as popular.
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
GPT-6 Astra hits 100% on ExploitBench and finds zero-days autonomously, while independent tests reveal scope violations and monitoring gaps.

Product
Socket can now send alerts and supply chain attack notifications to Microsoft Teams, with filters that route the right updates to each channel.

Security News
pnpm 12 rewrites the package manager in Rust, cutting install times by up to 90% while preserving pnpm 11 workflows and lockfiles.