npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@react-querybuilder/dnd

v8.15.0

Published

Drag-and-drop-enabled version of react-querybuilder (DnD-library-agnostic)

Downloads

153,809

Readme

@react-querybuilder/dnd

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.

Full documentation

Screenshot

Installation

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).

Usage

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>
);

Adapters

@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.

Notes

  • 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.
  • Multiple QueryBuilders may be nested beneath a single QueryBuilderDnD, and drag-and-drop works across them.
  • If your application already uses react-dnd, use QueryBuilderDndWithoutProvider instead of QueryBuilderDnD to avoid conflicting DndProvider contexts.