Having trouble getting help?
Contact Support
Contact Support
Tooltip in Angular Kanban component
27 Apr 20249 minutes to read
The tooltip is used to show the card information when the cursor hover over the card elements using the enableTooltip
property. Tooltip content is dynamically set based on hovering over the card elements.
If you wish to show tooltip on Kanban board custom elements, you need to add
e-tooltip-text
class name of a particular element.
Tooltip template
You can customize the tooltip content with any HTML or CSS element and styling using the tooltipTemplate
property. In the following demo, the tooltip is customized with HTML elements.
import { NgModule } from '@angular/core'
import { BrowserModule } from '@angular/platform-browser'
import { KanbanModule } from '@syncfusion/ej2-angular-kanban'
import { Component } from '@angular/core';
import { CardSettingsModel, SwimlaneSettingsModel } from '@syncfusion/ej2-angular-kanban';
import { kanbanData } from './datasource';
@Component({
imports: [
KanbanModule
],
standalone: true,
selector: 'app-root',
template: `<ejs-kanban keyField='Status' [dataSource]='data' [cardSettings]='cardSettings' enableTooltip='true'>
<e-columns>
<e-column headerText='To do' keyField='Open'></e-column>
<e-column headerText='In Progress' keyField='InProgress'></e-column>
<e-column headerText='Testing' keyField='Testing'></e-column>
<e-column headerText='Done' keyField='Close'></e-column>
</e-columns>
<ng-template #tooltipTemplate let-data>
<div class='e-kanbanTooltipTemp'>
<table>
<tr>
<td class="details">
<table>
<colgroup>
<col style="width:30%">
<col style="width:70%">
</colgroup>
<tbody>
<tr>
<td class="CardHeader">Assignee:</td>
<td></td>
</tr>
<tr>
<td class="CardHeader">Type:</td>
<td></td>
</tr>
<tr>
<td class="CardHeader">Estimate:</td>
<td></td>
</tr>
<tr>
<td class="CardHeader">Summary:</td>
<td></td>
</tr>
</tbody>
</table>
</td>
</tr>
</table>
</div>
</ng-template>
</ejs-kanban>`
})
export class AppComponent {
public data: Object[] = kanbanData;
public cardSettings: CardSettingsModel = {
contentField: 'Summary',
headerField: 'Id'
};
}
import { bootstrapApplication } from '@angular/platform-browser';
import { AppComponent } from './app.component';
import 'zone.js';
bootstrapApplication(AppComponent).catch((err) => console.error(err));