Data
Taskboard
A kanban board of cards in columns and swimlanes, dragged by mouse, touch or keyboard, with work-in-progress limits.
WAI-ARIA tested
Import
main.ts
import { Taskboard } from '@vitral/vue';Basic
A flat list of tasks, each naming its column. In progress holds two at most.
Backlog1 cards
To do2 cards
In progress2 of 2 cards
Done1 cards
- Draft the release notesDocs
- Audit colour contrastDesignHigh
- Virtual scrolling in SelectWeb
- Keyboard grid for DataGridWebHigh
- Theme editor prototypeDesign
- Publish 0.1WebHighLocked
Swimlanes
The same tasks split by team. Page Up and Page Down carry a picked-up card between lanes; a lane collapses from its header.
Backlog1 cards
To do2 cards
In progress2 of 2 cards
Done1 cards
Docs1 tasks
- Draft the release notes
No cards
No cards
No cards
Design2 tasks
No cards
- Audit colour contrast
- Theme editor prototype
No cards
Web3 tasks
No cards
- Virtual scrolling in Select
- Keyboard grid for DataGrid
- Publish 0.1
Nested columns
Columns that carry their own cards (v-model:columns). Later starts collapsed but still takes drops; Frozen is locked, and its card is disabled.
Ideas2 cards
Next1 cards
Later2 cards
Frozen1 cards
- Dark mode for charts
- Right-to-left layout
- Nuxt module
- IE support
canDrop
A hook has the last word: here only high-priority tasks may go to Done from anywhere but In progress.
Backlog1 cards
To do2 cards
In progress2 of 2 cards
Done1 cards
- Draft the release notes
- Audit colour contrast
- Virtual scrolling in Select
- Keyboard grid for DataGrid
- Theme editor prototype
- Publish 0.1
API
Read from packages/vue/src/components/Taskboard/types.ts, so it says what the component actually accepts.
Props
| Name | Type | Description |
|---|---|---|
| columns | TaskboardColumn[] | The columns, in order. With no `items`, each carries its own cards (`v-model:columns`). |
| items | unknown[] | The cards as one flat list (`v-model:items`); each names its column in `columnField`. |
| columnField | string | The field of a flat item that holds its column's key. Defaults to `'column'`. |
| laneField | string | The field that places a card in a swimlane; set it to split the board into lanes. |
| lanes | TaskboardLane[] | The lanes, in order. Without them, the lanes are the distinct values of `laneField`, in order of appearance. |
| dataKey | string | The field that identifies a card. Defaults to `'id'`. |
| cardLabel | string | The field holding a card's title, shown by the default card and used in the announcements. Defaults to `'title'`. |
| disabledField | string | The field that marks a card disabled: not clickable and not movable. Defaults to `'disabled'`. |
| lockedField | string | The field that marks a card locked: clickable but not movable. Defaults to `'locked'`. |
| canDrop | (context: TaskboardDropContext) => boolean | Last word on a drop. Return false to refuse it. |
| dragdrop | boolean | Cards can be dragged (pointer, touch or keyboard). Defaults to true. |
| reorderColumns | boolean | Columns can be reordered by their handle. Defaults to true. |
| collapsible | boolean | Columns (and lanes) get a button that collapses them. Defaults to true. |
| autoScroll | boolean | Scroll the board and the columns while a card is dragged near their edges. Defaults to true. |
| touchDelay | number | Milliseconds a finger rests on a card before it drags, so a swipe still scrolls. Defaults to 250. |
| scrollHeight | string | The height of a column's card list; it scrolls past it. |
| disabled | boolean | — |
Plus pt, dt and unstyled from BaseProps, see pass-through and unstyled mode.
Emits
| Event | Payload | Description |
|---|---|---|
| update:columns | value: TaskboardColumn[] | The columns after a card or column moved on a nested board, or after a column moved on a flat one. |
| update:items | value: unknown[] | The flat list after a card moved. |
| card-move | event: TaskboardCardMoveEvent | — |
| column-move | event: TaskboardColumnMoveEvent | — |
| card-click | event: { item: unknown; column: TaskboardColumn; originalEvent: Event } | — |
| drop-refused | event: TaskboardDropRefusedEvent | — |
Slots
| Name | Slot props | Description |
|---|---|---|
| default | — | The parts, written as children: `<Taskboard.Card>`, `<Taskboard.ColumnHeader>`… |
| card | (props: TaskboardCardSlotProps) | A card's content. |
| column-header | (props: TaskboardColumnSlotProps) | A column header's title area. |
| column-footer | (props: TaskboardColumnSlotProps) | Under a column. |
| add-card | (props: { column: TaskboardColumn; lane?: TaskboardLane }) | At the end of every cell: an "add card" button, typically. |
| lane-header | (props: { lane: TaskboardLane; count: number; collapsed: boolean; toggle: () => void }) | A lane header's title area. |
| empty | (props: { column: TaskboardColumn; lane?: TaskboardLane }) | An empty cell. |