mrshanebarron/kanban
最新稳定版本:v1.0.4
Composer 安装命令:
composer require mrshanebarron/kanban
包简介
Kanban board component for Laravel - supports Livewire and Vue
README 文档
README
A kanban board component for Laravel applications. Drag and drop cards between columns for project management. Works with Livewire and Vue 3.
Installation
composer require mrshanebarron/kanban
Livewire Usage
Basic Usage
<livewire:sb-kanban :columns="[ ['id' => 'todo', 'title' => 'To Do'], ['id' => 'progress', 'title' => 'In Progress'], ['id' => 'done', 'title' => 'Done'] ]" :items="$tasks" />
Livewire Props
| Prop | Type | Default | Description |
|---|---|---|---|
columns |
array | [] |
Column definitions |
items |
array | [] |
Card items with columnId |
Vue 3 Usage
Setup
import { SbKanban } from './vendor/sb-kanban'; app.component('SbKanban', SbKanban);
Basic Usage
<template> <SbKanban :columns="columns" v-model:items="tasks" @move="handleMove" /> </template> <script setup> import { ref } from 'vue'; const columns = [ { id: 'backlog', title: 'Backlog' }, { id: 'todo', title: 'To Do' }, { id: 'in-progress', title: 'In Progress' }, { id: 'done', title: 'Done' } ]; const tasks = ref([ { id: '1', title: 'Design homepage', columnId: 'todo' }, { id: '2', title: 'Setup database', columnId: 'in-progress' }, { id: '3', title: 'Create API endpoints', columnId: 'backlog' }, { id: '4', title: 'Write tests', columnId: 'backlog' } ]); const handleMove = ({ item, fromColumn, toColumn }) => { console.log(`Moved "${item.title}" from ${fromColumn} to ${toColumn}`); }; </script>
Custom Card Template
<template> <SbKanban :columns="columns" v-model:items="tasks"> <template #item="{ item }"> <div class="space-y-2"> <h4 class="font-medium">{{ item.title }}</h4> <p class="text-sm text-gray-500">{{ item.description }}</p> <div class="flex items-center gap-2"> <span class="px-2 py-0.5 text-xs bg-blue-100 text-blue-700 rounded"> {{ item.priority }} </span> <img v-if="item.assignee" :src="item.assignee.avatar" class="w-6 h-6 rounded-full ml-auto" /> </div> </div> </template> </SbKanban> </template>
Project Management Example
<template> <div class="p-4"> <h1 class="text-2xl font-bold mb-4">Sprint Board</h1> <SbKanban :columns="sprintColumns" v-model:items="sprintItems" @move="updateTaskStatus" > <template #item="{ item }"> <div> <div class="flex items-center justify-between mb-2"> <span class="text-xs text-gray-500">#{{ item.ticketId }}</span> <span :class="priorityClass(item.priority)">{{ item.priority }}</span> </div> <h4 class="font-medium text-gray-900">{{ item.title }}</h4> <p v-if="item.estimate" class="text-xs text-gray-500 mt-1"> Est: {{ item.estimate }}h </p> </div> </template> </SbKanban> </div> </template>
Vue Props
| Prop | Type | Default | Description |
|---|---|---|---|
columns |
Array | [] |
Column definitions |
items |
Array | [] |
Items with columnId property |
Events
| Event | Payload | Description |
|---|---|---|
update:items |
items[] |
Items array changed |
move |
{ item, fromColumn, toColumn } |
Card moved |
Slots
| Slot | Props | Description |
|---|---|---|
item |
{ item } |
Custom card template |
Column Object
{ id: 'column-id', // Unique identifier title: 'Column Name' // Display title }
Item Object
{ id: 'item-id', // Unique identifier title: 'Task Title', // Required description: 'Details', // Optional columnId: 'todo' // Which column it belongs to }
Features
- Drag and Drop: Native HTML5 drag/drop
- Column Counts: Shows item count per column
- Visual Feedback: Opacity change while dragging
- Custom Cards: Slot for custom card content
- Horizontal Scroll: Overflow handling for many columns
Styling
Uses Tailwind CSS:
- Gray column backgrounds
- White card backgrounds
- Shadow on cards
- Hover shadow enhancement
- Badge for column counts
Requirements
- PHP 8.1+
- Laravel 10, 11, or 12
- Tailwind CSS 3.x
License
MIT License
mrshanebarron/kanban 适用场景与选型建议
mrshanebarron/kanban 是一款 基于 Blade 开发的 Composer 扩展包,目前已累计 21 次下载、GitHub Stars 达 0, 最近一次更新时间为 2025 年 12 月 14 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 mrshanebarron/kanban 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 mrshanebarron/kanban 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 21
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 22
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-12-14