Kanban Board
wise-ui/kanban-boardFreeComponent
A drag-and-drop kanban board with collapsible columns and animated card transitions.
Live preview
live · rendered by the registry
Rendered by wise-ui on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://wise-ui.com/r/kanban-board.jsonSource
1"use client"23import * as React from "react"4import {5 DndContext,6 closestCorners,7 KeyboardSensor,8 PointerSensor,9 useSensor,10 useSensors,11 DragOverlay,12 type DragStartEvent,13 type DragEndEvent,14 type DragOverEvent,15} from "@dnd-kit/core"16import {17 arrayMove,18 SortableContext,19 sortableKeyboardCoordinates,20 useSortable,21 verticalListSortingStrategy,22} from "@dnd-kit/sortable"23import { CSS } from "@dnd-kit/utilities"24import { motion, AnimatePresence } from "motion/react"25import { cn } from "@/lib/utils"2627const EASE_OUT_QUART: [number, number, number, number] = [0.25, 1, 0.5, 1]2829// ── Types ────────────────────────────────────────────────────────────3031interface KanbanTag {32 id: string33 label: string34 color?: string35}3637interface KanbanColumn<T extends { id: string | number }> {38 id: string39 title: string40 items: T[]41}4243interface KanbanBoardProps<T extends { id: string | number }> {44 columns: KanbanColumn<T>[]45 onColumnsChange: (columns: KanbanColumn<T>[]) => void46 renderItem: (item: T, columnId: string) => React.ReactNode47 onAddItem?: (columnId: string, title: string, tagId?: string) => void48 tags?: KanbanTag[]49 /** Extract the tag id from an item - used for tag filtering */50 getItemTagId?: (item: T) => string | undefined51 collapsible?: boolean52 className?: string53 columnClassName?: string54 minColumnWidth?: number55 collapsedColumnWidth?: number56}5758// ── Sortable Item ────────────────────────────────────────────────────5960function KanbanSortableItem({61 id,62 children,63 isDragOverlay,64}: {65 id: string | number66 children: React.ReactNode67 isDragOverlay?: boolean68}) {69 const {70 attributes,71 listeners,72 setNodeRef,73 transform,74 isDragging,75 } = useSortable({ id })7677 if (isDragOverlay) {78 return (79 <motion.div80 className="touch-none cursor-grabbing"81 initial={{ scale: 1, boxShadow: "0 1px 3px rgba(0,0,0,0.08)" }}82 animate={{83 scale: 1.03,84 boxShadow: "0 12px 40px rgba(0,0,0,0.15), 0 4px 12px rgba(0,0,0,0.1)",85 }}86 transition={{ duration: 0.2, ease: EASE_OUT_QUART }}87 >88 {children}89 </motion.div>90 )91 }9293 const style: React.CSSProperties = {94 transform: CSS.Translate.toString(transform),95// … truncated
What it pulls in
npm packages
Files it writes
More from wise-ui
All 20 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Animated Tabsanimated-tabs | wise-ui | Components | Free | 3 deps | |
| Border Beamborder-beam | wise-ui | Components | Free | 3 deps | |
| Data Tabledata-table | wise-ui | Components | Free | 3 deps | |
| Dockdock | wise-ui | Components | Free | 3 deps | |
| Dot Matrixdot-matrix | wise-ui | Components | Free | 2 deps | |
| Editable Texteditable-text | wise-ui | Components | Free | 4 deps | |
| Gradient Sidebargradient-sidebar | wise-ui | Components | Free | 3 deps | |
| Magnetic Buttonmagnetic-button | wise-ui | Components | Free | 3 deps |
