
Product
Socket for ClickUp Is Now Available
Create ClickUp tasks from Socket alerts, automate ticketing with custom rules, and keep alert and task status synchronized.
@neodrag/solid
Advanced tools
A lightweight SolidJS directive to make your elements draggable.
pnpm add @neodrag/solid
# npm
npm install @neodrag/solid
# yarn
yarn add @neodrag/solid
Basic usage
import { createDraggable } from '@neodrag/solid';
export const App: Component = () => {
const { draggable } = createDraggable();
return <div use:draggable>You can drag me</div>;
};
With options
import { createDraggable } from '@neodrag/solid';
const { draggable } = createDraggable();
<div use:draggable={{ axis: 'x', grid: [10, 10] }}>I am draggable</div>;
Defining options elsewhere with typescript
import { createDraggable, type DragOptions } from '@neodrag/solid';
const options: DragOptions = {
axis: 'y',
bounds: 'parent',
};
const { draggable } = createDraggable();
<div use:draggable={options}>I am draggable</div>;
Reactive options:
import { createSignal } from 'solid-js';
import { createDraggable } from '@neodrag/solid';
const [options, setOptions] = createSignal({
axis: 'y',
bounds: 'parent',
});
<div use:draggable={options()}>I am draggable</div>;
// You can update `options` with `setOptions` anytime and it'll change. Neodrag will automatically update to the new options π
Inspired from the amazing react-draggable library, and implements even more features with a similar API, but 3.7x smaller.
MIT License Β© Puru Vijay
FAQs
SolidJS library to add dragging to your apps π
The npm package @neodrag/solid receives a total of 188,243 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.

Product
Create ClickUp tasks from Socket alerts, automate ticketing with custom rules, and keep alert and task status synchronized.

Product
Create and manage Asana tasks directly from Socket alerts, with manual task creation, automated ticketing rules, and two-way sync.

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.