Angular UI Components Documentation
The Angular Kanban can be used to implement the kanban method for a project. This guide adds the Angular Kanban (jqxKanban) to an app, then shows how to set its options, handle its events and call its methods.
jqwidgets-ngjqwidgets-ng/jqxkanban 
In an Angular project (to start one, see Getting started with Angular), add the package with the Angular CLI. It asks for a theme and adds the styles to angular.json:
ng add jqwidgets-ng
Components are standalone: add jqxKanbanModule to the imports of the component that uses it.
import { Component } from '@angular/core';
import { jqxKanbanModule } from 'jqwidgets-ng/jqxkanban';
@Component({
selector: 'app-root',
imports: [jqxKanbanModule],
templateUrl: './app.html'
})
export class App {}
The source of the live Default Functionality demo.
<jqxSplitter [width]="getWidth()" [height]='600' [panels]='mainSplitterPanels'>
<div>
<jqxKanban id="kanban1" #myKanbanOne
[width]='"100%"' [height]='"100%"' [source]='dataAdapter'
[columns]='kanbanOneColumns' [connectWith]='"#kanban2, #kanban3"'
[resources]='resourcesAdapterFunc()' [columnRenderer]='kanbanOneColumnRenderer'>
</jqxKanban>
</div>
<div>
<jqxSplitter [width]='"100%"' [height]='"100%"'
[orientation]='"horizontal"' [panels]='rightSplitterPanels'>
<div>
<jqxKanban id="kanban2" #myKanbanTwo
[width]='"100%"' [height]='"100%"' [source]='dataAdapter2'
[columns]='kanbanTwoColumns' [connectWith]='"#kanban1, #kanban3"'
[resources]='resourcesAdapterFunc()' [columnRenderer]='kanbanTwoColumnRenderer'>
</jqxKanban>
</div>
<div>
<jqxKanban id="kanban3" #myKanbanThree
[width]='"100%"' [height]='"100%"' [source]='dataAdapter3'
[columns]='kanbanThreeColumns' [connectWith]='"#kanban2, #kanban1"'
[resources]='resourcesAdapterFunc()' [columnRenderer]='kanbanThreeColumnRenderer'>
</jqxKanban>
</div>
</jqxSplitter>
</div>
</jqxSplitter>
import { Component, viewChild } from '@angular/core';
import { jqxKanbanComponent } from 'jqwidgets-ng/jqxkanban';
import { CommonModule } from '@angular/common';
import { jqxKanbanModule } from 'jqwidgets-ng/jqxkanban';
import { jqxSplitterModule } from 'jqwidgets-ng/jqxsplitter';
@Component({
imports: [CommonModule, jqxKanbanModule, jqxSplitterModule],
selector: 'app-root',
templateUrl: './app.html'
})
export class App {
readonly myKanbanOne = viewChild.required<jqxKanbanComponent>('myKanbanOne');
readonly myKanbanTwo = viewChild.required<jqxKanbanComponent>('myKanbanTwo');
readonly myKanbanThree = viewChild.required<jqxKanbanComponent>('myKanbanThree');
fields: any = [
{ name: 'status', map: 'state', type: 'string' },
{ name: 'text', map: 'label', type: 'string' },
{ name: 'tags', type: 'string' },
{ name: 'color', map: 'hex', type: 'string' },
{ name: 'resourceId', type: 'number' }
];
getWidth(): any {
if (document.body.offsetWidth < 850) {
return '90%';
}
return 850;
}
source: any = {
localData: [
{
state: 'new',
label: 'Combine Orders',
tags: 'orders, combine',
hex: '#5dc3f0',
resourceId: 3
},
{
state: 'new',
label: 'Change Billing Address',
tags: 'billing',
hex: '#f19b60',
resourceId: 1
},
{
state: 'new',
label: 'One item added to the cart',
tags: 'cart',
hex: '#5dc3f0',
resourceId: 3
},
{
state: 'new',
label: 'Edit Item Price',
tags: 'price, edit',
hex: '#5dc3f0',
resourceId: 4
},
{ state: 'new', label: 'Login 404 issue', tags: 'issue, login', hex: '#6bbd49' }
],
dataType: 'array',
dataFields: this.fields
};
dataAdapter: any = new jqx.dataAdapter(this.source);
source2: any = {
localData: [
{
state: 'ready',
label: 'Logout issue',
tags: 'logout, issue',
hex: '#5dc3f0',
resourceId: 7
},
{
state: 'ready',
label: 'Remember password issue',
tags: 'password, issue',
hex: '#6bbd49',
resourceId: 8
},
{
state: 'ready',
label: 'Cart calculation issue',
tags: 'cart, calculation',
hex: '#f19b60',
resourceId: 9
},
{ state: 'ready', label: 'Remove topic issue', tags: 'topic, issue', hex: '#6bbd49' }
],
dataType: 'array',
dataFields: this.fields
};
dataAdapter2: any = new jqx.dataAdapter(this.source2);
source3: any = {
localData: [
{
state: 'done',
label: 'Delete orders',
tags: 'orders, combine',
hex: '#f19b60',
resourceId: 4
},
{
state: 'work',
label: 'Add New Address',
tags: 'address',
hex: '#6bbd49',
resourceId: 5
},
{ state: 'new', label: 'Rename items', tags: 'rename', hex: '#5dc3f0', resourceId: 6 },
{ state: 'work', label: 'Update cart', tags: 'cart, update', hex: '#6bbd49' }
],
dataType: 'array',
dataFields: this.fields
};
dataAdapter3: any = new jqx.dataAdapter(this.source3);
resourcesAdapterFunc = (): any => {
let resourcesSource = {
localData: [
{
id: 0,
name: 'No name',
image: 'https://www.jqwidgets.com/angular/jqwidgets/styles/images/common.png',
common: true
},
{
id: 1,
name: 'Andrew Fuller',
image: 'https://www.jqwidgets.com/angular/images/andrew.png'
},
{
id: 2,
name: 'Janet Leverling',
image: 'https://www.jqwidgets.com/angular/images/janet.png'
},
{
id: 3,
name: 'Steven Buchanan',
image: 'https://www.jqwidgets.com/angular/images/steven.png'
},
{
id: 4,
name: 'Nancy Davolio',
image: 'https://www.jqwidgets.com/angular/images/nancy.png'
},
{
id: 5,
name: 'Michael Buchanan',
image: 'https://www.jqwidgets.com/angular/images/Michael.png'
},
{
id: 6,
name: 'Margaret Buchanan',
image: 'https://www.jqwidgets.com/angular/images/margaret.png'
},
{
id: 7,
name: 'Robert Buchanan',
image: 'https://www.jqwidgets.com/angular/images/robert.png'
},
{
id: 8,
name: 'Laura Buchanan',
image: 'https://www.jqwidgets.com/angular/images/Laura.png'
},
{
id: 9,
name: 'Laura Buchanan',
image: 'https://www.jqwidgets.com/angular/images/Anne.png'
}
],
dataType: 'array',
dataFields: [
{ name: 'id', type: 'number' },
{ name: 'name', type: 'string' },
{ name: 'image', type: 'string' },
{ name: 'common', type: 'boolean' }
]
};
let resourcesDataAdapter = new jqx.dataAdapter(resourcesSource);
return resourcesDataAdapter;
};
kanbanOneColumns: any[] = [{ text: 'Backlog', dataField: 'new', maxItems: 10 }];
kanbanOneColumnRenderer: any = (element: any, collapsedElement: any, column: any): void => {
if (this.myKanbanOne() && element[0]) {
let headerStatus = element[0].getElementsByClassName(
'jqx-kanban-column-header-status'
)[0];
let columnItems = this.myKanbanOne().getColumnItems(column.dataField).length;
headerStatus.innerHTML = ' (' + columnItems + '/' + column.maxItems + ')';
}
};
kanbanTwoColumns: any[] = [{ text: 'Ready', dataField: 'ready', maxItems: 10 }];
kanbanTwoColumnRenderer: any = (element: any, collapsedElement: any, column: any): void => {
if (this.myKanbanTwo() && element[0]) {
let headerStatus = element[0].getElementsByClassName(
'jqx-kanban-column-header-status'
)[0];
let columnItems = this.myKanbanTwo().getColumnItems(column.dataField).length;
headerStatus.innerHTML = ' (' + columnItems + '/' + column.maxItems + ')';
}
};
kanbanThreeColumns: any[] = [
{ text: 'Backlog', dataField: 'new', maxItems: 5 },
{ text: 'In Progress', dataField: 'work', maxItems: 5 },
{ text: 'Done', dataField: 'done', maxItems: 5 }
];
kanbanThreeColumnRenderer: any = (element: any, collapsedElement: any, column: any): void => {
if (this.myKanbanThree() && element[0]) {
let columnItems = this.myKanbanThree().getColumnItems(column.dataField).length;
let headerStatus = element[0].getElementsByClassName(
'jqx-kanban-column-header-status'
)[0];
headerStatus.innerHTML = ' (' + columnItems + '/' + column.maxItems + ')';
let collapsedHeaderStatus = collapsedElement[0].getElementsByClassName(
'jqx-kanban-column-header-status'
)[0];
collapsedHeaderStatus.innerHTML = ' (' + columnItems + '/' + column.maxItems + ')';
}
};
mainSplitterPanels: any[] = [{ size: 250, min: 100 }, { min: 250 }];
rightSplitterPanels: any[] = [{ min: 200, size: 350, collapsible: false }, { min: 200 }];
}Options are inputs, bound with [name]="value".
Events are outputs named on plus the event name with a capital first letter. For example, columnAttrClicked: This event is triggered when jqxKanban column is clicked.
<jqxKanban (onColumnAttrClicked)="onColumnAttrClicked($event)"></jqxKanban>
onColumnAttrClicked(event: any): void {
console.log(event.args);
}
Get the component with a signal query and call its methods. For example, addItem: Add new item in widget.
<jqxKanban #myKanban></jqxKanban>
import { Component, viewChild } from '@angular/core';
import { jqxKanbanModule, jqxKanbanComponent } from 'jqwidgets-ng/jqxkanban';
@Component({
selector: 'app-root',
imports: [jqxKanbanModule],
templateUrl: './app.html'
})
export class App {
readonly myKanban = viewChild.required<jqxKanbanComponent>('myKanban');
run(): void {
this.myKanban().addItem({ status: "new", text: "New Task", tags: "new task", color: "#5dc3f0" });
}
}