TaskBoard - API

Reference Vue TaskBoard props, compound parts, exposed methods, composables, and value types.

#Root Props

PropTypeDefaultUse
columnsTaskBoardColumn[][]Column metadata used by layout, workflow, and headers.
v-model:tasksTaskBoardItem[][]Controlled item array that TaskBoard can update.
itemsTaskBoardItem[]NoneOne-way external item array.
data-keystringRequiredItem id field.
column-fieldstringRequiredItem column field.
swimlane-fieldstringNoneItem swimlane field.
swimlanesTaskBoardSwimlane[][]Swimlane rows.
draggablebooleantrueEnables card dragging.
selection-modeTaskBoardSelectionModenoneCard selection mode.
context-menubooleanfalseEnables card context-menu handling.
densityTaskBoardDensitystandardRuntime density class.
featuresTaskBoardFeaturesEnabled unless falseFeature flags for drag, collapse, reorder, swimlanes, WIP, context menu, and selection.
rtlbooleanfalseRight-to-left rendering.
disabledbooleanfalseBlocks board interaction.
readonlybooleanfalseBlocks editing and dragging interaction.
column-widthnumber | stringNoneFixed desktop/tablet column width. Numbers use pixels; CSS length strings are accepted.
card-gapnumberNoneNon-negative card-stack gap in pixels.
scrollablebooleantrueEnables board-owned overflow; false lets the containing page own scrolling.
drag-min-distancenumberNonePointer distance before a card drag starts.
column-collapsiblebooleantrueEnables column collapse.
column-reorderablebooleanfalseEnables column drag reorder.
column-groupsTaskBoardColumnGroup[][]Group headers above columns.
virtual-scrollbooleanfalseEnables virtual scroll.
virtual-scroll-item-heightnumber250Estimated item or row height.
virtual-scroll-buffernumber3Extra rendered items around the visible range.
accessTaskBoardAccessNonePermissions and column access.

Layout overrides are opt-in. When omitted, column-width and card-gap preserve the active theme variables. Responsive mobile sizing and collapsed-column sizing take precedence over column-width. Virtual scrolling requires an internal scroll viewport, so virtual-scroll keeps board-owned scrolling active even when scrollable is false.

<TaskBoard.Root v-model:tasks="tasks" :columns="columns" data-key="id" column-field="status" :column-width="320" :card-gap="12" :scrollable="false" />

#Compound Parts

PartRuntime role
TaskBoard.RootProvides board state, events, data access, keyboard handling, drag handling, and exposed methods.
TaskBoard.HeaderReserves a board-level surface for toolbar, search, filters, or app actions.
TaskBoard.ContentRenders column, swimlane, group-header, and virtual-scroll layout.
TaskBoard.ColumnRegisters or renders one workflow column and its collapse or reorder state.
TaskBoard.ColumnContentIterates visible cards for a column or swimlane cell.
TaskBoard.CardProvides card context for custom card subparts. The interactive wrapper is rendered by content.
TaskBoard.DragPreview, TaskBoard.DragConfirmRender optional drag feedback and guarded-move surfaces.
TaskBoard.DropIndicatorReplaces the insertion marker while TaskBoard owns drag hit testing and target indexes.
TaskBoard.SwimlaneHeader, TaskBoard.SwimlaneColumnHeaderRender swimlane row and column-header surfaces.

The namespace export is import { TaskBoard } from '@primeui/vue-taskboard'; Named exports such as TaskBoardRoot, TaskBoardColumn, and TaskBoardCard are also available for projects that prefer direct imports.

#Value Types

TypeValues
TaskBoardSelectionModenone, single, multiple
TaskBoardDensitycompact, standard, comfortable
TaskBoardColumnStatustodo, in-progress, done, blocked
TypeRequired fieldsApp-owned fields
TaskBoardItemA stable value at data-key, plus a value at column-field.Any product metadata: title, customer, severity, assignee, due date, labels, progress, score, or custom data.
TaskBoardColumnid and label.statusType, wipLimit, locked, pinned, transition rules, required fields, color, icon, and order.
TaskBoardSwimlaneid and label when swimlanes are used.key, collapsed, and order.
TaskBoardColumnGrouplabel and columns.Grouping names, column membership, and optional accent color chosen by the app.

TaskBoardTask, TaskBoardPriority, and TaskBoardSubtask remain exported for older code and for apps that use the optional fields rendered by the included card UI parts. The root runtime does not require those fields.

#Feature and Access Types

Feature flagDefaultControls
dragDropEnabledPointer movement, drag preview, drop indicators, and move payloads.
columnCollapseEnabledColumn collapse state and @column-collapse.
columnReorderEnabled by feature flag, gated by column-reorderable for UI.Column drag reorder and @column-reorder.
swimlanesEnabledSwimlane rows and collapse state.
wipLimitsEnabledWIP status helpers and blocked move payloads.
contextMenuEnabled by flag, emits when context-menu is set.Right-click payloads for app-owned menus.
cardSelectionEnabledSelection state and selection-change payloads.
const access = {
    role: 'reviewer',
    canDrag: true,
    canEdit: false,
    canCreate: true,
    canDelete: false,
    canReorderColumns: false,
    columnAccess: {
        approved: { canMoveIn: false },
        archived: { canView: false }
    }
};

#Exposed Methods

Method groupMethods
ColumnsgetColumns, getColumnById, collapseColumn, expandColumn, toggleColumn
ItemsgetTasks, getTaskById, getTasksByColumn, addTask, updateTask, removeTask, moveTask
SelectiongetSelectedCardIds, getSelectedCards, setSelectedCards, clearSelection
SwimlanescollapseSwimlane, expandSwimlane, toggleSwimlane
ScrollingscrollToColumn, scrollToCard
Historyundo, redo, canUndo, canRedo, clearHistory
Export and printexportToJSON, exportToCSV, downloadJSON, downloadCSV, print
StateserializeState, restoreState, getAuditLog, clearAuditLog

moveTask(taskId, columnId, index?, swimlaneId?) accepts a fourth swimlane id for swimlane boards. Exposed item, selection, keyboard, and history methods use the configured data-key, column-field, and swimlane-field.

#Composables

useTaskBoardContext, useTaskBoardColumnContext, useTaskBoardCardContext, and useTaskBoardSwimlaneHeaderContext expose the public compound-part contexts. useTaskBoardSelection, useTaskBoardHistory, useTaskBoardAccess, useTaskBoardWorkflow, and useTaskBoardDrag expose focused slices of board state for product-owned controls.