react-dragdrop-kit 1.2.0 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +289 -337
- package/dist/index.esm.js +1 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/kanban.esm.js +1 -1
- package/dist/kanban.esm.js.map +1 -1
- package/dist/kanban.js +1 -1
- package/dist/kanban.js.map +1 -1
- package/dist/src/components/DragDropList.d.ts +1 -1
- package/dist/src/components/DraggableItemWrapper.d.ts +1 -1
- package/dist/src/hooks/useDragDropMonitor.d.ts +5 -2
- package/dist/src/kanban/types.d.ts +3 -1
- package/dist/src/kanban/utils/reorder.d.ts +6 -0
- package/dist/src/types/index.d.ts +5 -0
- package/dist/src/utils/order.d.ts +7 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,337 +1,289 @@
|
|
|
1
|
-
# react-dragdrop-kit
|
|
2
|
-
|
|
3
|
-
A flexible
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
-
|
|
17
|
-
-
|
|
18
|
-
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
-
|
|
27
|
-
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
-
|
|
31
|
-
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
{
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
-
|
|
217
|
-
-
|
|
218
|
-
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
##
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
- Normalized state structure
|
|
291
|
-
- No auto-generated IDs
|
|
292
|
-
- Render props instead of children
|
|
293
|
-
- Better TypeScript support
|
|
294
|
-
|
|
295
|
-
---
|
|
296
|
-
|
|
297
|
-
## 🤝 Contributing
|
|
298
|
-
|
|
299
|
-
Contributions are welcome! Please feel free to submit a Pull Request.
|
|
300
|
-
|
|
301
|
-
---
|
|
302
|
-
|
|
303
|
-
## 📝 License
|
|
304
|
-
|
|
305
|
-
MIT © [Yourstruggle11](https://github.com/Yourstruggle11)
|
|
306
|
-
|
|
307
|
-
---
|
|
308
|
-
|
|
309
|
-
## 🙏 Credits
|
|
310
|
-
|
|
311
|
-
Built with:
|
|
312
|
-
- [`@atlaskit/pragmatic-drag-and-drop`](https://atlassian.design/components/pragmatic-drag-and-drop) - Performance-focused drag and drop
|
|
313
|
-
- Inspired by `react-beautiful-dnd` API design
|
|
314
|
-
- Community feedback and contributions
|
|
315
|
-
|
|
316
|
-
---
|
|
317
|
-
|
|
318
|
-
## 📖 Documentation
|
|
319
|
-
|
|
320
|
-
- [Kanban Board Guide](./docs/kanban.md)
|
|
321
|
-
- [CHANGELOG](./CHANGELOG.md)
|
|
322
|
-
- [Examples](./examples/)
|
|
323
|
-
- [Demo Application](https://react-dragdrop-kit.netlify.app/)
|
|
324
|
-
|
|
325
|
-
---
|
|
326
|
-
|
|
327
|
-
## 💬 Support
|
|
328
|
-
|
|
329
|
-
- 🐛 [Report Issues](https://github.com/Yourstruggle11/react-dragdrop-kit/issues)
|
|
330
|
-
- 💡 [Request Features](https://github.com/Yourstruggle11/react-dragdrop-kit/issues/new)
|
|
331
|
-
- ⭐ [Star on GitHub](https://github.com/Yourstruggle11/react-dragdrop-kit)
|
|
332
|
-
|
|
333
|
-
---
|
|
334
|
-
|
|
335
|
-
<div align="center">
|
|
336
|
-
<strong>Made with ❤️ by <a href="https://github.com/Yourstruggle11" target="_blank" rel="noopener noreferrer">Yourstruggle11</a> for the React community</strong>
|
|
337
|
-
</div>
|
|
1
|
+
# react-dragdrop-kit
|
|
2
|
+
|
|
3
|
+
A flexible, lightweight drag-and-drop toolkit for React.
|
|
4
|
+
Build sortable lists, grids, and Kanban boards with a controlled API and minimal overhead.
|
|
5
|
+
|
|
6
|
+
[](https://www.npmjs.com/package/react-dragdrop-kit)
|
|
7
|
+
[](https://www.npmjs.com/package/react-dragdrop-kit)
|
|
8
|
+
[](https://bundlephobia.com/package/react-dragdrop-kit)
|
|
9
|
+
[](https://github.com/Yourstruggle11/react-dragdrop-kit)
|
|
10
|
+
[](https://deepwiki.com/Yourstruggle11/react-dragdrop-kit)
|
|
11
|
+
|
|
12
|
+
## Why this library
|
|
13
|
+
|
|
14
|
+
`react-dragdrop-kit` is designed around a controlled data model:
|
|
15
|
+
|
|
16
|
+
- You own state.
|
|
17
|
+
- The library reports drag intent and reorder results.
|
|
18
|
+
- You decide what to persist and render.
|
|
19
|
+
|
|
20
|
+
This keeps behavior predictable and easy to integrate with app-specific rules.
|
|
21
|
+
|
|
22
|
+
## Feature overview
|
|
23
|
+
|
|
24
|
+
### List and grid drag-and-drop
|
|
25
|
+
|
|
26
|
+
- Vertical and horizontal list support
|
|
27
|
+
- Controlled reorder callback: `onReorder(newItems, orderUpdates)`
|
|
28
|
+
- Optional visual drop indicator
|
|
29
|
+
- Optional custom drag preview style/class
|
|
30
|
+
- Optional handle-only dragging via `dragHandle`
|
|
31
|
+
- Optional multi-item drag with `selectedIds` + `multiDragEnabled`
|
|
32
|
+
|
|
33
|
+
### Kanban module
|
|
34
|
+
|
|
35
|
+
- Card reorder within columns
|
|
36
|
+
- Card movement across columns
|
|
37
|
+
- Column reordering
|
|
38
|
+
- Headless rendering (`renderColumn`, `renderCard`)
|
|
39
|
+
- Accessibility helpers (`AnnouncerProvider`, `useAnnouncer`, `announcements`)
|
|
40
|
+
- Keyboard drag-reorder is planned, not fully shipped yet
|
|
41
|
+
|
|
42
|
+
### General
|
|
43
|
+
|
|
44
|
+
- TypeScript-first API
|
|
45
|
+
- Lightweight runtime and tree-shakeable exports
|
|
46
|
+
- Built on `@atlaskit/pragmatic-drag-and-drop`
|
|
47
|
+
|
|
48
|
+
## Installation
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
npm install react-dragdrop-kit
|
|
52
|
+
# or
|
|
53
|
+
pnpm add react-dragdrop-kit
|
|
54
|
+
# or
|
|
55
|
+
yarn add react-dragdrop-kit
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Package entry points
|
|
59
|
+
|
|
60
|
+
```ts
|
|
61
|
+
import { DragDropList } from "react-dragdrop-kit";
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
```ts
|
|
65
|
+
import { KanbanBoard, applyDragResult } from "react-dragdrop-kit/kanban";
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Quick start: sortable list
|
|
69
|
+
|
|
70
|
+
```tsx
|
|
71
|
+
import { useState } from "react";
|
|
72
|
+
import { DragDropList } from "react-dragdrop-kit";
|
|
73
|
+
|
|
74
|
+
interface Todo {
|
|
75
|
+
id: string;
|
|
76
|
+
position: number;
|
|
77
|
+
title: string;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export default function TodoList() {
|
|
81
|
+
const [items, setItems] = useState<Todo[]>([
|
|
82
|
+
{ id: "1", position: 0, title: "Design" },
|
|
83
|
+
{ id: "2", position: 1, title: "Build" },
|
|
84
|
+
{ id: "3", position: 2, title: "Ship" },
|
|
85
|
+
]);
|
|
86
|
+
|
|
87
|
+
return (
|
|
88
|
+
<DragDropList
|
|
89
|
+
items={items}
|
|
90
|
+
onReorder={(next) =>
|
|
91
|
+
setItems(next.map((item, index) => ({ ...item, position: index })))
|
|
92
|
+
}
|
|
93
|
+
renderItem={(item) => (
|
|
94
|
+
<div style={{ padding: 12, border: "1px solid #e5e7eb", borderRadius: 8 }}>
|
|
95
|
+
{item.title}
|
|
96
|
+
</div>
|
|
97
|
+
)}
|
|
98
|
+
showDropIndicator
|
|
99
|
+
gap={8}
|
|
100
|
+
/>
|
|
101
|
+
);
|
|
102
|
+
}
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
## Quick start: drag handle and multi-drag
|
|
106
|
+
|
|
107
|
+
```tsx
|
|
108
|
+
<DragDropList
|
|
109
|
+
items={items}
|
|
110
|
+
onReorder={handleReorder}
|
|
111
|
+
renderItem={renderItem}
|
|
112
|
+
dragHandle="[data-drag-handle]"
|
|
113
|
+
selectedIds={selectedIds}
|
|
114
|
+
multiDragEnabled
|
|
115
|
+
/>
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
Behavior notes:
|
|
119
|
+
|
|
120
|
+
- `dragHandle` is optional. If provided, drag starts only from matching descendants.
|
|
121
|
+
- `multiDragEnabled` is opt-in. Without it, behavior remains single-item drag.
|
|
122
|
+
- `selectedIds` is consumed only when multi-drag is enabled.
|
|
123
|
+
|
|
124
|
+
## Quick start: Kanban board
|
|
125
|
+
|
|
126
|
+
```tsx
|
|
127
|
+
import { useCallback, useState } from "react";
|
|
128
|
+
import {
|
|
129
|
+
KanbanBoard,
|
|
130
|
+
applyDragResult,
|
|
131
|
+
type DropResult,
|
|
132
|
+
type KanbanBoardState,
|
|
133
|
+
} from "react-dragdrop-kit/kanban";
|
|
134
|
+
|
|
135
|
+
export default function Board() {
|
|
136
|
+
const [state, setState] = useState<KanbanBoardState>({
|
|
137
|
+
columns: [
|
|
138
|
+
{ id: "todo", title: "To Do", cardIds: ["task-1", "task-2"] },
|
|
139
|
+
{ id: "done", title: "Done", cardIds: [] },
|
|
140
|
+
],
|
|
141
|
+
cards: {
|
|
142
|
+
"task-1": { id: "task-1", title: "Design landing page" },
|
|
143
|
+
"task-2": { id: "task-2", title: "Implement auth" },
|
|
144
|
+
},
|
|
145
|
+
});
|
|
146
|
+
|
|
147
|
+
const handleDragEnd = useCallback(
|
|
148
|
+
(result: DropResult, stateBefore: KanbanBoardState) => {
|
|
149
|
+
if (!result.destination) return;
|
|
150
|
+
setState(applyDragResult(stateBefore, result));
|
|
151
|
+
},
|
|
152
|
+
[]
|
|
153
|
+
);
|
|
154
|
+
|
|
155
|
+
return (
|
|
156
|
+
<KanbanBoard
|
|
157
|
+
state={state}
|
|
158
|
+
onDragEnd={handleDragEnd}
|
|
159
|
+
renderColumn={(column) => <div style={{ padding: 12 }}>{column.title}</div>}
|
|
160
|
+
renderCard={(card) => <div style={{ padding: 12 }}>{card.title}</div>}
|
|
161
|
+
/>
|
|
162
|
+
);
|
|
163
|
+
}
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
## API reference: list module
|
|
167
|
+
|
|
168
|
+
### Core types
|
|
169
|
+
|
|
170
|
+
```ts
|
|
171
|
+
type DraggableItem = {
|
|
172
|
+
id: string;
|
|
173
|
+
position: number;
|
|
174
|
+
[key: string]: any;
|
|
175
|
+
};
|
|
176
|
+
|
|
177
|
+
type OrderUpdate = {
|
|
178
|
+
id: string;
|
|
179
|
+
newPosition: number;
|
|
180
|
+
moved?: boolean;
|
|
181
|
+
};
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
### DragDropList props
|
|
185
|
+
|
|
186
|
+
| Prop | Type | Default | Description |
|
|
187
|
+
| --- | --- | --- | --- |
|
|
188
|
+
| `items` | `T[]` | Required | Controlled items. Each item must include `id` and `position`. |
|
|
189
|
+
| `onReorder` | `(newItems: T[], orderUpdates: OrderUpdate[]) => void` | Required | Fired after successful drop/reorder. |
|
|
190
|
+
| `renderItem` | `(item: T, index: number) => ReactNode` | Required | Item renderer. |
|
|
191
|
+
| `containerClassName` | `string` | `""` | Class name for container. |
|
|
192
|
+
| `containerStyle` | `React.CSSProperties` | `{}` | Inline style for container. |
|
|
193
|
+
| `itemClassName` | `string` | `""` | Class for each draggable wrapper. |
|
|
194
|
+
| `itemStyle` | `React.CSSProperties` | `{}` | Style for each draggable wrapper. |
|
|
195
|
+
| `dragPreviewClassName` | `string` | `""` | Class for generated drag preview. |
|
|
196
|
+
| `dragPreviewStyle` | `React.CSSProperties` | `{}` | Style for generated drag preview. |
|
|
197
|
+
| `onDragStart` | `(item: T, index: number) => void` | `undefined` | Callback on item drag start. |
|
|
198
|
+
| `onDragEnd` | `(item: T, index: number) => void` | `undefined` | Callback on item drag end. |
|
|
199
|
+
| `disabled` | `boolean` | `false` | Disables list drag/drop. |
|
|
200
|
+
| `gap` | `number \| string` | `undefined` | Gap applied to container. |
|
|
201
|
+
| `direction` | `"vertical" \| "horizontal"` | `"vertical"` | Layout and closest-edge interpretation. |
|
|
202
|
+
| `showDropIndicator` | `boolean` | `false` | Enables drop indicator line. |
|
|
203
|
+
| `dropIndicatorClassName` | `string` | `""` | Class for drop indicator. |
|
|
204
|
+
| `dropIndicatorStyle` | `React.CSSProperties` | `{}` | Style for drop indicator. |
|
|
205
|
+
| `dropIndicatorPosition` | `"top" \| "bottom"` | `"bottom"` | Indicator position for hovered target item. |
|
|
206
|
+
| `dragHandle` | `string` | `undefined` | CSS selector for handle-only dragging. |
|
|
207
|
+
| `selectedIds` | `string[]` | `[]` | Selected IDs used by multi-drag. |
|
|
208
|
+
| `multiDragEnabled` | `boolean` | `false` | Enables grouped drag behavior. |
|
|
209
|
+
|
|
210
|
+
## API reference: Kanban module
|
|
211
|
+
|
|
212
|
+
The full Kanban API is documented in [docs/kanban.md](./docs/kanban.md).
|
|
213
|
+
|
|
214
|
+
Exports:
|
|
215
|
+
|
|
216
|
+
- Components: `KanbanBoard`, `KanbanColumnView`, `KanbanCardView`
|
|
217
|
+
- Hooks: `useKanbanDnd`, `useAutoscroll`
|
|
218
|
+
- A11y: `AnnouncerProvider`, `useAnnouncer`, `announcements`
|
|
219
|
+
- Utils: `applyDragResult`, `reorderArray`
|
|
220
|
+
- Types: `KanbanBoardState`, `DropResult`, `KanbanCard`, `KanbanColumn`, and more
|
|
221
|
+
|
|
222
|
+
## Examples
|
|
223
|
+
|
|
224
|
+
### Repository examples
|
|
225
|
+
|
|
226
|
+
- `examples/basic-example.tsx`
|
|
227
|
+
- `examples/advanced-features.tsx`
|
|
228
|
+
- `examples/material-ui-example.tsx`
|
|
229
|
+
- `examples/tailwind-example.tsx`
|
|
230
|
+
- `examples/kanban/basic-kanban.tsx`
|
|
231
|
+
- `examples/kanban/rich-cards-kanban.tsx`
|
|
232
|
+
- `examples/kanban/themed-kanban.tsx`
|
|
233
|
+
- `examples/kanban/accessible-kanban.tsx`
|
|
234
|
+
|
|
235
|
+
### Demo examples
|
|
236
|
+
|
|
237
|
+
- List/grid examples under `apps/demo/src/examples/*`
|
|
238
|
+
- Kanban demos:
|
|
239
|
+
- `apps/demo/src/examples/BasicKanban/index.tsx`
|
|
240
|
+
- `apps/demo/src/examples/RichKanban/index.tsx`
|
|
241
|
+
- `apps/demo/src/examples/SwimlanesKanban/index.tsx`
|
|
242
|
+
- `apps/demo/src/examples/WipLimitsKanban/index.tsx`
|
|
243
|
+
|
|
244
|
+
## Migration notes
|
|
245
|
+
|
|
246
|
+
### From react-beautiful-dnd
|
|
247
|
+
|
|
248
|
+
High-level mapping for Kanban use cases:
|
|
249
|
+
|
|
250
|
+
- `DragDropContext` -> `KanbanBoard`
|
|
251
|
+
- `Droppable` -> `KanbanColumnView`
|
|
252
|
+
- `Draggable` -> `KanbanCardView`
|
|
253
|
+
|
|
254
|
+
Important differences:
|
|
255
|
+
|
|
256
|
+
1. State is normalized (`columns` + `cards`) instead of nested.
|
|
257
|
+
2. IDs are explicit and owned by your app.
|
|
258
|
+
3. Rendering is done via render functions (`renderColumn`, `renderCard`).
|
|
259
|
+
|
|
260
|
+
## Development notes
|
|
261
|
+
|
|
262
|
+
### React Strict Mode
|
|
263
|
+
|
|
264
|
+
In development, React Strict Mode can mount effects twice.
|
|
265
|
+
Ensure listener setup and cleanup are idempotent when integrating custom logic.
|
|
266
|
+
|
|
267
|
+
## Bundle size
|
|
268
|
+
|
|
269
|
+
Approximate minified sizes:
|
|
270
|
+
|
|
271
|
+
- `react-dragdrop-kit`: about 5KB
|
|
272
|
+
- `react-dragdrop-kit/kanban`: about 9KB
|
|
273
|
+
|
|
274
|
+
## Documentation and links
|
|
275
|
+
|
|
276
|
+
- [Kanban guide](./docs/kanban.md)
|
|
277
|
+
- [Known issues](./KNOWN_ISSUES.md)
|
|
278
|
+
- [Changelog](./packages/react-dragdrop-kit/CHANGELOG.md)
|
|
279
|
+
- [Examples folder](./examples)
|
|
280
|
+
- [Demo app](https://react-dragdrop-kit.netlify.app/)
|
|
281
|
+
|
|
282
|
+
## Support
|
|
283
|
+
|
|
284
|
+
- [Report issues](https://github.com/Yourstruggle11/react-dragdrop-kit/issues)
|
|
285
|
+
- [Request features](https://github.com/Yourstruggle11/react-dragdrop-kit/issues/new)
|
|
286
|
+
|
|
287
|
+
## License
|
|
288
|
+
|
|
289
|
+
MIT
|