# atlassian/react-beautiful-dnd architecture

> Architecture diagram of the GitHub repository atlassian/react-beautiful-dnd, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-09). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/atlassian/react-beautiful-dnd
- Repository: https://github.com/atlassian/react-beautiful-dnd

## Overview

react-beautiful-dnd is a React library for accessible drag-and-drop list interactions. Applications compose DragDropContext, Droppable, and Draggable; users initiate movement through mouse, touch, keyboard, or custom sensors; the library tracks dimensions and drag state, calculates reorder or combine impact, and reports the completed drop to application responders. It also supports auto-scrolling, virtual lists, animation, and screen-reader announcements. Sampled source shows context setup, draggable registration, and component wiring; several domain relationships below rely on README statements because their implementation was not sampled.

Main entry points: [`src/view/drag-drop-context/app.jsx`](https://github.com/atlassian/react-beautiful-dnd/blob/master/src/view/drag-drop-context/app.jsx) (Context runtime), [`src/view/drag-drop-context/drag-drop-context.jsx`](https://github.com/atlassian/react-beautiful-dnd/blob/master/src/view/drag-drop-context/drag-drop-context.jsx) (Drag context), [`src/view/droppable`](https://github.com/atlassian/react-beautiful-dnd/tree/master/src/view/droppable) (Droppable area), [`src/state/middleware/responders`](https://github.com/atlassian/react-beautiful-dnd/tree/master/src/state/middleware/responders) (Drop responders)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["React API"]
  node_context["Drag context"]
  node_app_runtime["Context runtime<br/>[app.jsx]"]
  node_droppable["Droppable area"]
  node_draggable["Draggable item<br/>[draggable.jsx]"]
  node_publisher["Dimension publisher"]
end

subgraph group_input["Input and accessibility"]
  node_sensors["Input sensors"]
  node_focus["Focus management"]
  node_announcer["Screen reader"]
end

subgraph group_engine["Drag state engine"]
  node_store["Drag store<br/>[create-store.js]"]
  node_actions["Drag actions<br/>[action-creators.js]"]
  node_dimensions["Dimension marshal"]
  node_registry["Item registry"]
  node_impact["Drop impact"]
  node_reducer["State transitions<br/>[reducer.js]"]
end

subgraph group_effects["Movement and feedback"]
  node_autoscroll["Auto-scrolling"]
  node_animation["Drag animation<br/>[animation.js]"]
  node_responders["Drop responders"]
end

node_app(("Application"))

node_app -->|"composes"| node_context
node_context -->|"renders"| node_app_runtime
node_app_runtime -->|"creates"| node_store
node_app_runtime -->|"creates"| node_dimensions
node_app_runtime -->|"creates"| node_autoscroll
node_app_runtime -->|"uses"| node_registry
node_context -->|"contains"| node_droppable
node_droppable -->|"contains"| node_draggable
node_draggable -->|"registers dimensions"| node_publisher
node_publisher -->|"registers item"| node_registry
node_app -->|"starts and controls"| node_sensors
node_sensors -.->|"dispatches drag"| node_app_runtime
node_app_runtime -->|"binds movement"| node_actions
node_actions -.->|"updates state"| node_reducer
node_dimensions -.->|"supplies geometry"| node_impact
node_app_runtime -->|"manages focus"| node_focus
node_app_runtime -->|"announces status"| node_announcer
node_app_runtime -->|"publishes callbacks"| node_responders
node_app_runtime -->|"supports movement"| node_animation
node_autoscroll -->|"scrolls containers"| node_droppable
node_app -->|"receives drop result"| node_responders
node_impact -.->|"determines drop result"| node_responders

click node_context "https://github.com/atlassian/react-beautiful-dnd/blob/master/src/view/drag-drop-context/drag-drop-context.jsx"
click node_app_runtime "https://github.com/atlassian/react-beautiful-dnd/blob/master/src/view/drag-drop-context/app.jsx"
click node_droppable "https://github.com/atlassian/react-beautiful-dnd/tree/master/src/view/droppable"
click node_draggable "https://github.com/atlassian/react-beautiful-dnd/blob/master/src/view/draggable/draggable.jsx"
click node_publisher "https://github.com/atlassian/react-beautiful-dnd/blob/master/src/view/use-draggable-publisher/use-draggable-publisher.js"
click node_sensors "https://github.com/atlassian/react-beautiful-dnd/blob/master/src/view/use-sensor-marshal/use-sensor-marshal.js"
click node_focus "https://github.com/atlassian/react-beautiful-dnd/tree/master/src/view/use-focus-marshal"
click node_announcer "https://github.com/atlassian/react-beautiful-dnd/tree/master/src/view/use-announcer"
click node_store "https://github.com/atlassian/react-beautiful-dnd/blob/master/src/state/create-store.js"
click node_actions "https://github.com/atlassian/react-beautiful-dnd/blob/master/src/state/action-creators.js"
click node_dimensions "https://github.com/atlassian/react-beautiful-dnd/blob/master/src/state/dimension-marshal/dimension-marshal.js"
click node_registry "https://github.com/atlassian/react-beautiful-dnd/tree/master/src/state/registry"
click node_impact "https://github.com/atlassian/react-beautiful-dnd/tree/master/src/state/get-drag-impact"
click node_reducer "https://github.com/atlassian/react-beautiful-dnd/blob/master/src/state/reducer.js"
click node_autoscroll "https://github.com/atlassian/react-beautiful-dnd/tree/master/src/state/auto-scroller"
click node_animation "https://github.com/atlassian/react-beautiful-dnd/blob/master/src/animation.js"
click node_responders "https://github.com/atlassian/react-beautiful-dnd/tree/master/src/state/middleware/responders"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_context,node_app_runtime,node_droppable,node_draggable,node_publisher toneBlue
class node_sensors,node_focus,node_announcer toneAmber
class node_store,node_actions,node_dimensions,node_registry,node_impact,node_reducer toneMint
class node_autoscroll,node_animation,node_responders toneRose
class node_app toneIndigo
```

## Components

### React API

- [Drag context](https://github.com/atlassian/react-beautiful-dnd/blob/master/src/view/drag-drop-context/drag-drop-context.jsx): `src/view/drag-drop-context/drag-drop-context.jsx`
- [Context runtime](https://github.com/atlassian/react-beautiful-dnd/blob/master/src/view/drag-drop-context/app.jsx): `src/view/drag-drop-context/app.jsx`
- [Droppable area](https://github.com/atlassian/react-beautiful-dnd/tree/master/src/view/droppable): `src/view/droppable`
- [Draggable item](https://github.com/atlassian/react-beautiful-dnd/blob/master/src/view/draggable/draggable.jsx): `src/view/draggable/draggable.jsx`
- [Dimension publisher](https://github.com/atlassian/react-beautiful-dnd/blob/master/src/view/use-draggable-publisher/use-draggable-publisher.js): `src/view/use-draggable-publisher/use-draggable-publisher.js`

### Input and accessibility

- [Input sensors](https://github.com/atlassian/react-beautiful-dnd/blob/master/src/view/use-sensor-marshal/use-sensor-marshal.js): `src/view/use-sensor-marshal/use-sensor-marshal.js`
- [Focus management](https://github.com/atlassian/react-beautiful-dnd/tree/master/src/view/use-focus-marshal): `src/view/use-focus-marshal`
- [Screen reader](https://github.com/atlassian/react-beautiful-dnd/tree/master/src/view/use-announcer): `src/view/use-announcer`

### Drag state engine

- [Drag store](https://github.com/atlassian/react-beautiful-dnd/blob/master/src/state/create-store.js): `src/state/create-store.js`
- [Drag actions](https://github.com/atlassian/react-beautiful-dnd/blob/master/src/state/action-creators.js): `src/state/action-creators.js`
- [Dimension marshal](https://github.com/atlassian/react-beautiful-dnd/blob/master/src/state/dimension-marshal/dimension-marshal.js): `src/state/dimension-marshal/dimension-marshal.js`
- [Item registry](https://github.com/atlassian/react-beautiful-dnd/tree/master/src/state/registry): `src/state/registry`
- [Drop impact](https://github.com/atlassian/react-beautiful-dnd/tree/master/src/state/get-drag-impact): `src/state/get-drag-impact`
- [State transitions](https://github.com/atlassian/react-beautiful-dnd/blob/master/src/state/reducer.js): `src/state/reducer.js`

### Movement and feedback

- [Auto-scrolling](https://github.com/atlassian/react-beautiful-dnd/tree/master/src/state/auto-scroller): `src/state/auto-scroller`
- [Drag animation](https://github.com/atlassian/react-beautiful-dnd/blob/master/src/animation.js): `src/animation.js`
- [Drop responders](https://github.com/atlassian/react-beautiful-dnd/tree/master/src/state/middleware/responders): `src/state/middleware/responders`

### Other components

- **Application**

## Connections

- Application → Drag context: composes
- Drag context → Context runtime: renders (evidence: `src/view/drag-drop-context/drag-drop-context.jsx`)
- Context runtime → Drag store: creates (evidence: `src/view/drag-drop-context/app.jsx`)
- Context runtime → Dimension marshal: creates (evidence: `src/view/drag-drop-context/app.jsx`)
- Context runtime → Auto-scrolling: creates (evidence: `src/view/drag-drop-context/app.jsx`)
- Context runtime → Item registry: uses (evidence: `src/view/drag-drop-context/app.jsx`)
- Drag context → Droppable area: contains
- Droppable area → Draggable item: contains
- Draggable item → Dimension publisher: registers dimensions (evidence: `src/view/draggable/draggable.jsx`)
- Dimension publisher → Item registry: registers item (evidence: `src/view/use-draggable-publisher/use-draggable-publisher.js`)
- Application → Input sensors: starts and controls
- Input sensors → Context runtime: dispatches drag (evidence: `src/view/drag-drop-context/app.jsx`)
- Context runtime → Drag actions: binds movement (evidence: `src/view/drag-drop-context/app.jsx`)
- Drag actions → State transitions: updates state
- Dimension marshal → Drop impact: supplies geometry
- Context runtime → Focus management: manages focus (evidence: `src/view/drag-drop-context/app.jsx`)
- Context runtime → Screen reader: announces status (evidence: `src/view/drag-drop-context/app.jsx`)
- Context runtime → Drop responders: publishes callbacks
- Context runtime → Drag animation: supports movement
- Auto-scrolling → Droppable area: scrolls containers
- Application → Drop responders: receives drop result
- Drop impact → Drop responders: determines drop result
