Taskboard
A kanban board of cards in columns and swimlanes, dragged by mouse, touch or keyboard, with work-in-progress limits.
Import
import { Taskboard } from '@vitral/vue';Basic
A flat list of tasks, each naming its column. In progress holds two at most.
- 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.
- Draft the release notes
- Audit colour contrast
- Theme editor prototype
- 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.
- Dark mode for charts
- Right-to-left layout
- Nuxt module
- IE support
A figure per column
`summary` adds up a field of each column's cards — the story points here — and shows it beside the count, as it does beside each lane's. `type` makes it an average, a minimum or a maximum, and `format` words it. Move a card and the figures follow.
- Sign-in with passkeys8 pts
- Empty states3 pts
- Export to CSV5 pts
- Trend lines5 pts
- Guided tour13 pts
canDrop
A hook has the last word: here only high-priority tasks may go to Done from anywhere but In progress.
- Draft the release notes
- Audit colour contrast
- Virtual scrolling in Select
- Keyboard grid for DataGrid
- Theme editor prototype
- Publish 0.1
Filtered
`filter` shows only some cards: words, looked for in each card's text and numbers with case and accents aside (“revisao” finds Revisão), or a function that keeps a card. The counts are of the cards shown. While a filter hides some cards they cannot be dragged — a drop between two visible cards would say nothing about where it goes among the hidden ones — and picking one up says so.
- Audit colour contrastDesign
- Virtual scrolling in SelectWeb
- Revisão da documentaçãoDocs
- Keyboard grid for DataGridWeb
- Theme editor prototypeDesign
- Release notes for 0.3Docs
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. |
| summary | TaskboardSummary | A figure beside each column's and lane's count, from a field of its cards: `{ field: 'points', format: '{value} pts' }`. |
| 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'`. |
| filter | string | ((item: any) => boolean) | null | Shows only some cards: words looked for in each card's text and numbers (case and accents aside), or a function that keeps a card. Cards cannot be dragged while a filter hides some. |
| 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 | — |
| scrollbar | ScrollbarMode | The bars of the boxes this component scrolls inside — `'hover'`, `'always'` or `'native'`. The application's `scrollbar` option by default, which is `'hover'`. |
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. |