kanban
kibo-ui-registry/kanbanFreeComponent
A kanban board is a visual tool that helps you manage and visualize your work. It is a board with columns, and each column represents a status, e.g. "Backlog", "In Progress", "Done".
Live preview
live · rendered by the registry
Rendered by Kibo UI Registry on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://www.kibo-ui.com/r/kanban.jsonSource
1"use client";23import type {4 Announcements,5 DndContextProps,6 DragEndEvent,7 DragOverEvent,8 DragStartEvent,9} from "@dnd-kit/core";10import {11 closestCenter,12 DndContext,13 DragOverlay,14 KeyboardSensor,15 MouseSensor,16 TouchSensor,17 useDroppable,18 useSensor,19 useSensors,20} from "@dnd-kit/core";21import { arrayMove, SortableContext, useSortable } from "@dnd-kit/sortable";22import { CSS } from "@dnd-kit/utilities";23import {24 createContext,25 type HTMLAttributes,26 type ReactNode,27 useContext,28 useState,29} from "react";30import { createPortal } from "react-dom";31import tunnel from "tunnel-rat";32import { Card } from "@/components/ui/card";33import { ScrollArea, ScrollBar } from "@/components/ui/scroll-area";34import { cn } from "@/lib/utils";3536const t = tunnel();3738export type { DragEndEvent } from "@dnd-kit/core";3940type KanbanItemProps = {41 id: string;42 name: string;43 column: string;44} & Record<string, unknown>;4546type KanbanColumnProps = {47 id: string;48 name: string;49} & Record<string, unknown>;5051type KanbanContextProps<52 T extends KanbanItemProps = KanbanItemProps,53 C extends KanbanColumnProps = KanbanColumnProps,54> = {55 columns: C[];56 data: T[];57 activeCardId: string | null;58};5960const KanbanContext = createContext<KanbanContextProps>({61 columns: [],62 data: [],63 activeCardId: null,64});6566export type KanbanBoardProps = {67 id: string;68 children: ReactNode;69 className?: string;70};7172export const KanbanBoard = ({ id, children, className }: KanbanBoardProps) => {73 const { isOver, setNodeRef } = useDroppable({74 id,75 });7677 return (78 <div79 className={cn(80 "flex size-full min-h-40 flex-col divide-y overflow-hidden rounded-md border bg-secondary text-xs shadow-sm ring-2 transition-all",81 isOver ? "ring-primary" : "ring-transparent",82 className83 )}84 ref={setNodeRef}85 >86 {children}87 </div>88 );89};9091export type KanbanCardProps<T extends KanbanItemProps = KanbanItemProps> = T & {92 children?: ReactNode;93 className?: string;94};9596export const KanbanCard = <T extends KanbanItemProps = KanbanItemProps>({97 id,98 name,99 children,100 className,101}: KanbanCardProps<T>) => {102 const {103 attributes,104 listeners,105 setNodeRef,106 transition,107 transform,108 isDragging,109 } = useSortable({110 id,111 });112 const { activeCardId } = useContext(KanbanContext) as KanbanContextProps;113114 const style = {115 transition,116 transform: CSS.Transform.toString(transform),117 };118119 return (120 <>121// … truncated
What it pulls in
npm packages
Other registry items
Files it writes
More from Kibo UI Registry
All 41 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| announcementannouncement | Kibo UI Registry | Components | Free | no deps | |
| avatar-stackavatar-stack | Kibo UI Registry | Components | Free | no deps | |
| bannerbanner | Kibo UI Registry | Components | Free | 2 deps | |
| calendarcalendar | Kibo UI Registry | Components | Free | 3 deps | |
| choiceboxchoicebox | Kibo UI Registry | Components | Free | 2 deps | |
| code-blockcode-block | Kibo UI Registry | Components | Free | 5 deps · 2 files | |
| color-pickercolor-picker | Kibo UI Registry | Components | Free | 3 deps | |
| comboboxcombobox | Kibo UI Registry | Components | Free | 2 deps |
