react-native-kanban 0.0.0-stage → 0.0.2

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/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Abad
4
+ Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ of this software and associated documentation files (the "Software"), to deal
6
+ in the Software without restriction, including without limitation the rights
7
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ copies of the Software, and to permit persons to whom the Software is
9
+ furnished to do so, subject to the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be included in all
12
+ copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,98 @@
1
- # Temporary Holding Version
1
+ # react-native-kanban
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ [![npm version](https://img.shields.io/npm/v/react-native-kanban.svg)](https://www.npmjs.com/package/react-native-kanban)
4
+ [![CI](https://github.com/AbadurRehman/react-native-kanban/actions/workflows/ci.yml/badge.svg)](https://github.com/AbadurRehman/react-native-kanban/actions/workflows/ci.yml)
5
+ [![license](https://img.shields.io/npm/l/react-native-kanban.svg)](./LICENSE)
6
+
7
+ Customizable drag-and-drop Kanban board for React Native, built on [Reanimated](https://docs.swmansion.com/react-native-reanimated/) and [Gesture Handler](https://docs.swmansion.com/react-native-gesture-handler/). Inspired by [react-kanban](https://github.com/lourenci/react-kanban), so the data model will feel familiar if you've used it on the web.
8
+
9
+ > [!WARNING]
10
+ > **Work in progress.** `0.0.x` only ships the data model types. The `<Board />` component lands in `0.1.0`, and drag & drop in `0.2.0`. See the [roadmap](#roadmap).
11
+
12
+ ## Goals
13
+
14
+ - 🧩 **Pure JavaScript.** No native code of its own. Works with Expo and React Native CLI.
15
+ - 🎨 **Fully themeable.** Theme tokens, light/dark/auto presets, per-part style overrides and render props.
16
+ - 🚀 **UI-thread drag & drop.** Long-press to drag, auto-scroll, smooth reordering on Reanimated 4.
17
+ - 🔁 **react-kanban–style API.** Controlled and uncontrolled modes plus pure helpers (`moveCard`, `addCard`, …).
18
+ - ♿ **Accessible.** Screen-reader actions for moving cards (planned for v1).
19
+
20
+ ## Installation
21
+
22
+ ```sh
23
+ npm install react-native-kanban react-native-reanimated react-native-worklets react-native-gesture-handler
24
+ ```
25
+
26
+ | Peer dependency | Supported |
27
+ | ------------------------------ | ---------- |
28
+ | `react-native` | New Architecture |
29
+ | `react-native-reanimated` | `>= 4.0.0` |
30
+ | `react-native-worklets` | matching your Reanimated version |
31
+ | `react-native-gesture-handler` | `>= 2.20.0` (2.x and 3.x) |
32
+
33
+ - **React Native CLI:** add `'react-native-worklets/plugin'` as the **last** plugin in `babel.config.js`.
34
+ - **Expo (SDK 54+):** no Babel changes needed. Install the peers with `npx expo install`.
35
+ - Wrap your app in `GestureHandlerRootView`.
36
+
37
+ ## Data model
38
+
39
+ ```ts
40
+ import type { KanbanBoard } from 'react-native-kanban';
41
+
42
+ const board: KanbanBoard = {
43
+ columns: [
44
+ {
45
+ id: 'todo',
46
+ title: 'To do',
47
+ cards: [{ id: 1, title: 'Design card', description: 'Theme tokens first' }],
48
+ },
49
+ { id: 'done', title: 'Done', cards: [] },
50
+ ],
51
+ };
52
+ ```
53
+
54
+ Add your own fields with generics:
55
+
56
+ ```ts
57
+ interface TaskCard extends KanbanCard {
58
+ priority: 'low' | 'medium' | 'high';
59
+ }
60
+
61
+ const board: KanbanBoard<TaskCard> = { columns: [] };
62
+ ```
63
+
64
+ Exported types: `KanbanBoard`, `KanbanColumn`, `KanbanCard`, `KanbanId`, `CardSource`, `CardDestination`, `ColumnSource`, `ColumnDestination`.
65
+
66
+ ## Roadmap
67
+
68
+ - [x] **0.0.x: Setup.** Library scaffold, React Native CLI + Expo example apps, CI, data model types.
69
+ - [ ] **0.1.0: Static board + theming.** `<Board />`, theme presets, style overrides, render props, layout options, helpers.
70
+ - [ ] **0.2.0: Card drag & drop.** Long-press drag, placeholder, auto-scroll, controlled/uncontrolled, callbacks.
71
+ - [ ] **0.3.0: Drag customization.** `dragStyle`, custom drag preview/placeholder, `canDragCard`/`canDropCard`.
72
+ - [ ] **0.4.0: Columns & scale.** Column reordering, virtualization, 500+ card benchmarks.
73
+ - [ ] **1.0.0: Polish.** Accessibility, RTL, tablets, web demo, migration guide from react-kanban.
74
+
75
+ ## Example apps
76
+
77
+ This repo has two example apps that use the library straight from `src/`:
78
+
79
+ | App | Folder | Run |
80
+ | --- | --- | --- |
81
+ | React Native CLI | [`example/`](./example) | `yarn example android` / `yarn example ios` |
82
+ | Expo | [`example-expo/`](./example-expo) | `yarn example:expo android` / `yarn example:expo ios` / `yarn example:expo web` |
83
+
84
+ CI builds both apps on Android and iOS, plus the Expo app for web, on every PR.
85
+
86
+ ## Contributing
87
+
88
+ - [Development workflow](CONTRIBUTING.md#development-workflow)
89
+ - [Sending a pull request](CONTRIBUTING.md#sending-a-pull-request)
90
+ - [Code of conduct](CODE_OF_CONDUCT.md)
91
+
92
+ ## License
93
+
94
+ MIT © [Abad](https://github.com/AbadurRehman)
95
+
96
+ ---
97
+
98
+ Made with [create-react-native-library](https://github.com/callstack/react-native-builder-bob)
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":"","ignoreList":[]}
@@ -0,0 +1 @@
1
+ {"type":"module"}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../src","sources":["types.ts"],"mappings":"","ignoreList":[]}
@@ -0,0 +1 @@
1
+ {"type":"module"}
@@ -0,0 +1,2 @@
1
+ export type { CardDestination, CardSource, ColumnDestination, ColumnSource, KanbanBoard, KanbanCard, KanbanColumn, KanbanId, } from './types.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAAA,YAAY,EACV,eAAe,EACf,UAAU,EACV,iBAAiB,EACjB,YAAY,EACZ,WAAW,EACX,UAAU,EACV,YAAY,EACZ,QAAQ,GACT,MAAM,YAAS,CAAC"}
@@ -0,0 +1,47 @@
1
+ /**
2
+ * Core data model for react-native-kanban.
3
+ *
4
+ * The shape follows the web library react-kanban
5
+ * (`{ columns: [{ id, title, cards: [{ id, title, description }] }] }`)
6
+ * so boards can be shared between web and mobile code.
7
+ *
8
+ * Types are prefixed with `Kanban` so the names `Board`, `Column` and `Card`
9
+ * stay free for the components that arrive in later releases.
10
+ */
11
+ /** Identifier for a card or column. Must be unique within its board. */
12
+ export type KanbanId = string | number;
13
+ /** A single card. Add any extra fields your app needs via generics. */
14
+ export interface KanbanCard {
15
+ id: KanbanId;
16
+ title?: string;
17
+ description?: string;
18
+ }
19
+ /** A column (lane) holding an ordered list of cards. */
20
+ export interface KanbanColumn<TCard extends KanbanCard = KanbanCard> {
21
+ id: KanbanId;
22
+ title?: string;
23
+ cards: TCard[];
24
+ }
25
+ /** The whole board: an ordered list of columns. */
26
+ export interface KanbanBoard<TCard extends KanbanCard = KanbanCard, TColumn extends KanbanColumn<TCard> = KanbanColumn<TCard>> {
27
+ columns: TColumn[];
28
+ }
29
+ /** Where a dragged card came from. */
30
+ export interface CardSource {
31
+ fromColumnId: KanbanId;
32
+ fromPosition: number;
33
+ }
34
+ /** Where a dragged card was dropped. */
35
+ export interface CardDestination {
36
+ toColumnId: KanbanId;
37
+ toPosition: number;
38
+ }
39
+ /** Where a dragged column came from. */
40
+ export interface ColumnSource {
41
+ fromPosition: number;
42
+ }
43
+ /** Where a dragged column was dropped. */
44
+ export interface ColumnDestination {
45
+ toPosition: number;
46
+ }
47
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,wEAAwE;AACxE,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,MAAM,CAAC;AAEvC,uEAAuE;AACvE,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,QAAQ,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,wDAAwD;AACxD,MAAM,WAAW,YAAY,CAAC,KAAK,SAAS,UAAU,GAAG,UAAU;IACjE,EAAE,EAAE,QAAQ,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,KAAK,EAAE,CAAC;CAChB;AAED,mDAAmD;AACnD,MAAM,WAAW,WAAW,CAC1B,KAAK,SAAS,UAAU,GAAG,UAAU,EACrC,OAAO,SAAS,YAAY,CAAC,KAAK,CAAC,GAAG,YAAY,CAAC,KAAK,CAAC;IAEzD,OAAO,EAAE,OAAO,EAAE,CAAC;CACpB;AAED,sCAAsC;AACtC,MAAM,WAAW,UAAU;IACzB,YAAY,EAAE,QAAQ,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,wCAAwC;AACxC,MAAM,WAAW,eAAe;IAC9B,UAAU,EAAE,QAAQ,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,wCAAwC;AACxC,MAAM,WAAW,YAAY;IAC3B,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,0CAA0C;AAC1C,MAAM,WAAW,iBAAiB;IAChC,UAAU,EAAE,MAAM,CAAC;CACpB"}
package/package.json CHANGED
@@ -1,6 +1,172 @@
1
1
  {
2
2
  "name": "react-native-kanban",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.0.2",
4
+ "description": "Customizable drag-and-drop Kanban board for React Native, built on Reanimated and Gesture Handler",
5
+ "main": "./lib/module/index.js",
6
+ "types": "./lib/typescript/src/index.d.ts",
7
+ "exports": {
8
+ ".": {
9
+ "react-native-kanban-source": "./src/index.tsx",
10
+ "types": "./lib/typescript/src/index.d.ts",
11
+ "default": "./lib/module/index.js"
12
+ },
13
+ "./package.json": "./package.json"
14
+ },
15
+ "files": [
16
+ "src",
17
+ "lib",
18
+ "!**/__tests__",
19
+ "!**/__fixtures__",
20
+ "!**/__mocks__",
21
+ "!**/.*"
22
+ ],
23
+ "scripts": {
24
+ "example": "yarn workspace react-native-kanban-example",
25
+ "example:expo": "yarn workspace react-native-kanban-example-expo",
26
+ "clean": "del-cli example/android/build example/android/app/build example/ios/build example-expo/android example-expo/ios example-expo/dist lib",
27
+ "prepare": "bob build",
28
+ "typecheck": "tsc",
29
+ "lint": "eslint \"**/*.{js,ts,tsx}\"",
30
+ "test": "jest",
31
+ "release": "release-it --only-version"
32
+ },
33
+ "keywords": [
34
+ "react-native",
35
+ "kanban",
36
+ "kanban-board",
37
+ "board",
38
+ "drag-and-drop",
39
+ "dnd",
40
+ "sortable",
41
+ "trello",
42
+ "react-kanban",
43
+ "reanimated",
44
+ "gesture-handler",
45
+ "expo",
46
+ "ios",
47
+ "android"
48
+ ],
49
+ "repository": {
50
+ "type": "git",
51
+ "url": "git+https://github.com/AbadurRehman/react-native-kanban.git"
52
+ },
53
+ "author": "Abad <abadurrehman98@gmail.com> (https://github.com/AbadurRehman)",
54
+ "license": "MIT",
55
+ "bugs": {
56
+ "url": "https://github.com/AbadurRehman/react-native-kanban/issues"
57
+ },
58
+ "homepage": "https://github.com/AbadurRehman/react-native-kanban#readme",
59
+ "publishConfig": {
60
+ "registry": "https://registry.npmjs.org/"
61
+ },
62
+ "devDependencies": {
63
+ "@babel/core": "^7.25.2",
64
+ "@eslint/compat": "^2.1.1",
65
+ "@eslint/eslintrc": "^3.3.7",
66
+ "@eslint/js": "^9.39.5",
67
+ "@jest/globals": "^29.7.0",
68
+ "@react-native/babel-preset": "0.88.0",
69
+ "@react-native/eslint-config": "0.88.0",
70
+ "@react-native/jest-preset": "0.88.0",
71
+ "@react-native/metro-config": "0.88.0",
72
+ "@release-it/conventional-changelog": "^12.0.2",
73
+ "@types/react": "^19.2.0",
74
+ "del-cli": "^8.0.1",
75
+ "eslint": "^9.39.5",
76
+ "eslint-config-prettier": "^10.1.8",
77
+ "eslint-plugin-ft-flow": "^3.0.11",
78
+ "eslint-plugin-prettier": "^5.5.7",
79
+ "jest": "^29.7.0",
80
+ "prettier": "^3.9.10",
81
+ "react": "19.3.0",
82
+ "react-native": "0.88.0",
83
+ "react-native-builder-bob": "^0.44.1",
84
+ "react-native-gesture-handler": "3.5.0",
85
+ "react-native-reanimated": "4.8.0",
86
+ "react-native-worklets": "0.14.0",
87
+ "release-it": "^21.1.1",
88
+ "turbo": "^2.11.10",
89
+ "typescript": "^6.0.3"
90
+ },
91
+ "peerDependencies": {
92
+ "react": "*",
93
+ "react-native": "*",
94
+ "react-native-gesture-handler": ">=2.20.0",
95
+ "react-native-reanimated": ">=4.0.0",
96
+ "react-native-worklets": "*"
97
+ },
98
+ "workspaces": [
99
+ "example",
100
+ "example-expo"
101
+ ],
102
+ "packageManager": "yarn@4.18.1",
103
+ "react-native-builder-bob": {
104
+ "source": "src",
105
+ "output": "lib",
106
+ "targets": [
107
+ [
108
+ "module",
109
+ {
110
+ "esm": true
111
+ }
112
+ ],
113
+ [
114
+ "typescript",
115
+ {
116
+ "project": "tsconfig.build.json"
117
+ }
118
+ ]
119
+ ]
120
+ },
121
+ "prettier": {
122
+ "quoteProps": "consistent",
123
+ "singleQuote": true,
124
+ "tabWidth": 2,
125
+ "trailingComma": "es5",
126
+ "useTabs": false
127
+ },
128
+ "jest": {
129
+ "preset": "@react-native/jest-preset",
130
+ "testEnvironmentOptions": {
131
+ "customExportConditions": [
132
+ "require",
133
+ "react-native",
134
+ "react-native-kanban-source"
135
+ ]
136
+ },
137
+ "modulePathIgnorePatterns": [
138
+ "<rootDir>/example/node_modules",
139
+ "<rootDir>/example-expo/node_modules",
140
+ "<rootDir>/lib/"
141
+ ]
142
+ },
143
+ "release-it": {
144
+ "git": {
145
+ "commitMessage": "chore: release ${version}",
146
+ "tagName": "v${version}"
147
+ },
148
+ "npm": {
149
+ "publish": true
150
+ },
151
+ "github": {
152
+ "release": true
153
+ },
154
+ "plugins": {
155
+ "@release-it/conventional-changelog": {
156
+ "preset": {
157
+ "name": "angular"
158
+ }
159
+ }
160
+ }
161
+ },
162
+ "create-react-native-library": {
163
+ "type": "library",
164
+ "languages": "js",
165
+ "tools": [
166
+ "eslint",
167
+ "jest",
168
+ "release-it"
169
+ ],
170
+ "version": "0.64.0"
171
+ }
172
+ }
package/src/index.tsx ADDED
@@ -0,0 +1,10 @@
1
+ export type {
2
+ CardDestination,
3
+ CardSource,
4
+ ColumnDestination,
5
+ ColumnSource,
6
+ KanbanBoard,
7
+ KanbanCard,
8
+ KanbanColumn,
9
+ KanbanId,
10
+ } from './types';
package/src/types.ts ADDED
@@ -0,0 +1,57 @@
1
+ /**
2
+ * Core data model for react-native-kanban.
3
+ *
4
+ * The shape follows the web library react-kanban
5
+ * (`{ columns: [{ id, title, cards: [{ id, title, description }] }] }`)
6
+ * so boards can be shared between web and mobile code.
7
+ *
8
+ * Types are prefixed with `Kanban` so the names `Board`, `Column` and `Card`
9
+ * stay free for the components that arrive in later releases.
10
+ */
11
+
12
+ /** Identifier for a card or column. Must be unique within its board. */
13
+ export type KanbanId = string | number;
14
+
15
+ /** A single card. Add any extra fields your app needs via generics. */
16
+ export interface KanbanCard {
17
+ id: KanbanId;
18
+ title?: string;
19
+ description?: string;
20
+ }
21
+
22
+ /** A column (lane) holding an ordered list of cards. */
23
+ export interface KanbanColumn<TCard extends KanbanCard = KanbanCard> {
24
+ id: KanbanId;
25
+ title?: string;
26
+ cards: TCard[];
27
+ }
28
+
29
+ /** The whole board: an ordered list of columns. */
30
+ export interface KanbanBoard<
31
+ TCard extends KanbanCard = KanbanCard,
32
+ TColumn extends KanbanColumn<TCard> = KanbanColumn<TCard>,
33
+ > {
34
+ columns: TColumn[];
35
+ }
36
+
37
+ /** Where a dragged card came from. */
38
+ export interface CardSource {
39
+ fromColumnId: KanbanId;
40
+ fromPosition: number;
41
+ }
42
+
43
+ /** Where a dragged card was dropped. */
44
+ export interface CardDestination {
45
+ toColumnId: KanbanId;
46
+ toPosition: number;
47
+ }
48
+
49
+ /** Where a dragged column came from. */
50
+ export interface ColumnSource {
51
+ fromPosition: number;
52
+ }
53
+
54
+ /** Where a dragged column was dropped. */
55
+ export interface ColumnDestination {
56
+ toPosition: number;
57
+ }