
Security News
Socket Releases Free Certified Patches for Critical vm2 Sandbox Escape
A critical vm2 sandbox escape can allow untrusted JavaScript to break isolation and execute commands on the host Node.js process.
@react-querybuilder/dnd
Advanced tools
Drag-and-drop-enabled version of react-querybuilder (DnD-library-agnostic)
Augments react-querybuilder with drag-and-drop functionality.
To see this in action, check out the react-querybuilder demo with the drag-and-drop option enabled.

npm i react-querybuilder @react-querybuilder/dnd
# OR yarn add / pnpm add / bun add
Then install the drag-and-drop library of your choice (see Adapters).
Nest QueryBuilder under a QueryBuilderDnD provider, passing an adapter to the dnd prop:
import { combine } from '@atlaskit/pragmatic-drag-and-drop/combine';
import {
draggable,
dropTargetForElements,
monitorForElements,
} from '@atlaskit/pragmatic-drag-and-drop/element/adapter';
import { QueryBuilderDnD } from '@react-querybuilder/dnd';
import { createPragmaticDndAdapter } from '@react-querybuilder/dnd/pragmatic-dnd';
import { QueryBuilder } from 'react-querybuilder';
const dnd = createPragmaticDndAdapter({
draggable,
dropTargetForElements,
monitorForElements,
combine,
});
const App = () => (
<QueryBuilderDnD dnd={dnd}>
<QueryBuilder />
</QueryBuilderDnD>
);
@react-querybuilder/dnd uses an adapter pattern to support multiple drag-and-drop libraries without requiring all of them as dependencies. Each adapter is available as a separate subpath import, so only the library you use needs to be installed.
We recommend Pragmatic DnD if you have no other constraints.
Built-in adapters:
| Adapter | Import path | Install |
|---|---|---|
| @atlaskit/pragmatic-drag-and-drop (recommended) | @react-querybuilder/dnd/pragmatic-dnd | @atlaskit/pragmatic-drag-and-drop |
| react-dnd | @react-querybuilder/dnd/react-dnd | react-dnd + react-dnd-html5-backend |
| @dnd-kit/core | @react-querybuilder/dnd/dnd-kit | @dnd-kit/core |
You can also create custom adapters by implementing the DndAdapter interface (exported from @react-querybuilder/dnd). See the full documentation for details.
QueryBuilderDnD automatically sets enableDragAndDrop to true on descendant QueryBuilder elements unless explicitly set to false.QueryBuilderDnD does not need to be an immediate ancestor to QueryBuilder.QueryBuilders may be nested beneath a single QueryBuilderDnD, and drag-and-drop works across them.react-dnd, use QueryBuilderDndWithoutProvider instead of QueryBuilderDnD to avoid conflicting DndProvider contexts.FAQs
Drag-and-drop-enabled version of react-querybuilder (DnD-library-agnostic)
The npm package @react-querybuilder/dnd receives a total of 28,788 weekly downloads. As such, @react-querybuilder/dnd popularity was classified as popular.
We found that @react-querybuilder/dnd 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
A critical vm2 sandbox escape can allow untrusted JavaScript to break isolation and execute commands on the host Node.js process.

Research
Five malicious NuGet packages impersonate Chinese .NET libraries to deploy a stealer targeting browser credentials, crypto wallets, SSH keys, and local files.

Security News
pnpm 11 turns on a 1-day Minimum Release Age and blocks exotic subdeps by default, adding safeguards against fast-moving supply chain attacks.