Kanban JAVASCRIPT UI Component API

Kanban Javascript API

Class

Kanban

Kanban represents a kanban board that visually depicts work at various stages of a process using cards to represent tasks and columns to represent each stage of the process.

Selector

smart-kanban

Properties

AallowColumnReorderControls whether users can reorder columns in a table or grid. When set to true and used in combination with allowDrag enabled, this property lets users rearrange columns by dragging and dropping their headers. For example, a user can click and hold the header of the first column, then drag it to a new position over another column header and drop it, changing the column order visually and functionally. This enhances the user experience by allowing customizable column layouts.
AallowColumnEditControls whether column editing is permitted. When this property is set to true, users can dynamically edit the column's header label by double-clicking on it. This allows for in-place renaming of the column header directly within the user interface. If set to false, the column header label will remain static and cannot be modified by users.
AallowColumnRemoveControls whether users can remove columns from the table. When set to true, a "Remove Column" option will appear in the column actions menu, allowing users to dynamically delete columns. Note: The 'columnActions' property must also be enabled (set to true) for this feature to be available.
AallowColumnHideControls whether users can hide columns in the data table. When set to true, this property allows users to dynamically hide individual columns using the column actions menu. Note: To enable this feature, the 'columnActions' property must also be set to true.
AaddNewButtonControls whether the "Add Task" button is displayed at the top of each column. To hide the button for an individual column, set the addNewButton property to false within that column’s configuration object. If addNewButton is false, users will not see the "Add Task" button for that specific column.
AaddNewButtonDisplayModeSpecifies whether the add button appears in the column header, after the list of tasks within the column, or both. This controls the visibility and placement of the add button for creating new tasks in each column.
AaddNewColumnSpecifies whether a special column containing a button for adding new status columns to the Kanban board is shown. When enabled, this feature allows users to quickly create additional status columns directly within the Kanban interface. You can use this setting to display or hide the "Add Column" button column as needed.
AaddNewColumnWidthSpecifies the width of the dynamically added "Add New" column. This property is effective only when the 'columnWidth' property is also set. It allows you to control the exact width (in pixels or other valid CSS units) of the new column that appears when adding columns dynamically to the table or grid.
AallowDragEnables users to click and drag tasks within the interface, allowing them to easily reorder, move, or reorganize tasks by dragging and dropping them to the desired position.
AallowDropEnables users to remove or discard tasks from the list or workflow, either by dragging and dropping or through a designated action, facilitating task management and organization.
AallowDropPlaceholderEnables a visual placeholder to appear when dragging and dropping tasks. As you drag a task over another task, an empty space is dynamically created at the drop location, clearly indicating where the dragged task will be inserted. This improves usability by providing real-time visual feedback during task reordering.
AapplyColumnColorToTasksThis property controls the color styling of Kanban columns and their associated tasks. When set to true, and if a Kanban column has its color property defined, that color will not only visually highlight the column header but will also be applied to all tasks within that column, as well as to the background or accent color of the edit dialog for tasks in that column. This creates a consistent and visually cohesive color scheme throughout each column and its related UI elements.
AautoLoadStateControls whether the application automatically loads its state from the browser’s localStorage. This includes restoring information such as:- The list of tasks and their positions- The selected task and its state- Applied filters and sorting options- The state of collapsed columns- The values of the following task-related properties: - taskActions - taskComments - taskDue - taskPriority - taskProgress - taskTags - taskUserIconWhen enabled, all of these details will be reloaded from localStorage on page refresh or reopening the application, ensuring a consistent user experience. When disabled, this information will not be loaded automatically, and the state will not be restored.
AautoSaveStateControls whether the application's current state is automatically saved to the browser's localStorage. When enabled, the following information is persistently stored and restored across sessions: - Task data, including their current positions, selected status, and any applied filters or sorting.- The collapsed or expanded state of columns.- Values for the following properties: - taskActions (user actions related to tasks) - taskComments (comments attached to tasks) - taskDue (task due dates) - taskPriority (priority level of tasks) - taskProgress (progress tracking for tasks) - taskTags (tags associated with each task) - taskUserIcon (user avatars/icons linked to tasks)This ensures that user preferences and the state of the task interface are preserved, providing a seamless user experience even after closing or refreshing the browser. Disabling this feature will prevent any state information from being stored in localStorage, and all settings will be reset upon page reload.
AautoColumnHeightDynamically adjusts the height of each column based on the total height of its tasks, ensuring all content is fully visible. This property is effective only when 'columnColorEntireSurface' is set to true, allowing the background color to extend appropriately over the column’s entire surface.
CcollapsibleEnables the card content to be expanded or collapsed, providing users with the ability to show or hide additional information within the card. This enhances the user interface by reducing visual clutter and allowing for more compact content presentation.
CcolumnColorsDisplays a color indicator in the column header whenever the column's color property is defined. The header visually reflects the assigned color, making it easier to identify and distinguish columns based on their color settings.
CcolumnWidthDefines the width for each Kanban column. When this property is specified, all Kanban columns are rendered at the given width. If the total width of all columns exceeds the available space, a horizontal scrollbar will appear, allowing users to scroll and view all columns.
CcolumnColorEntireSurfaceRenders a customizable background within the Kanban column, allowing for enhanced visual separation and improved column identification. Supports various background options such as color, image, or pattern to match your application's design requirements.
CcolumnFooterRenders a column footer that displays a summary value, such as totals or averages, for the data in that column. This footer helps users quickly interpret aggregate information at the bottom of the column.
CcolumnsProvides detailed definitions and configuration options for each column’s properties, including attributes such as data type, default value, visibility, header label, and formatting options. Click for more details. Property object's options:
  • addNewButton:boolean - Sets or gets whether the column's button for adding tasks is visible. Works in conjunction with the Kanban property of the same name.
  • allowRemove:boolean - Sets or gets whether the column can be removed from the column menu.
  • collapsed:boolean - Sets or gets whether the column is collapsed.
  • collapsible:boolean - Sets or gets whether the column is collapsible. Works in conjunction with the Kanban property of the same name.
  • columns:{ addNewButton?: boolean, collapsed?: string, collapsible?: string, columns?: [], dataField?: string, label?: string, orientation?: string, selected?: string }[] - Sets or gets the column's sub-columns. Sub-columns has the same properties as top-level columns.
  • dataField:string - Sets or gets the column's data source bound field. Corresponds to the status field in the data source.
  • label:string - Sets or gets the text displayed in the column's header.
  • editable:boolean - Sets or gets whether a column is editable.
  • visible:boolean - Sets or gets whether a column is visible.
  • reorder:boolean - Sets or gets whether a column can be reordered.
  • orientation:string - Sets or gets whether the tasks in the column flow vertically or horizontally.
  • selected:boolean - Sets or gets whether the column is selected. Only applicable to sub-columns when hierarchy is 'tabs'.
  • headerTemplate:any - Determines whether a column header has a template. You can pass 'string', 'function' or HTMLTemplateElement as a value.
  • width:number | null - Sets the Kanban column width. When this property is set, the kanban column width is set and a horizontal scrollbar may appear.
CcolumnActionsControls whether the column actions icon is displayed, allowing users to access additional options or actions for each table column. When enabled, the icon becomes visible; when disabled, the icon is hidden from view.
CcolumnSummarySpecifies whether the number of tasks is shown in the headers of each column, allowing users to see the count of tasks directly within the column titles.
CcolumnHeaderTemplateSpecifies whether a custom template is applied to the column header. Accepts a value of type string (containing template markup), function (returning a template or markup), or an HTMLTemplateElement. Use this property to customize the appearance and content of the column header beyond the default rendering.
CcolumnEditModeSpecifies how column editing is initiated within the interface. - When set to ''header'', editing mode is activated by double-clicking directly on the column's header label. - When set to ''menu'', editing can only be started through the column's context or 'columnActions' menu. - When set to ''headerAndMenu'', both methods are available—users can begin editing either by double-clicking the header or by selecting the relevant option from the column menu.
CcurrentUserSets or retrieves the ID of the currently active user. This value must match the 'id' of a user object within the 'users' property or array. The privileges and access rights available are determined based on the current user's identity. If no current user is specified, the element's permissions default to those defined by its own properties, rather than user-specific settings.
DdisableDialogControls whether the default dialog for adding or removing tasks or comments is enabled or disabled. When set to true, the dialog will not appear, allowing for custom handling of these actions. When set to false, the standard dialog will be shown as usual. This property can be used to either retrieve the current setting (get) or define its behavior (set).
DdialogCustomizationFunctionSets or retrieves a customization function for the Kanban dialog component. This function allows you to modify the appearance and behavior of the dialog, or to replace it entirely with a custom implementation. When invoked, the Kanban component calls this function with five arguments:- 'dialog': The default dialog instance, typically a 'smart-window' object, which serves as the default modal dialog for tasks and comments.- 'taskOrComment': The data object representing either a Kanban task or a comment, depending on the context of the action.- 'editors': An object containing the input elements or editors used within the dialog for data entry or modification.- 'purpose': A string indicating the dialog’s intent, such as ''add'' for creating a new item or ''edit'' for modifying an existing one.- 'type': A string specifying the entity being processed, such as ''task'' for task-related dialogs or ''column'' for column-related dialogs.By providing a custom function, you can tailor the dialog’s UI, integrate additional logic, or substitute a completely different dialog component to meet your application's requirements.
DdialogRenderedSets or retrieves the callback function that is executed when the dialog is rendered. This function is invoked by the Kanban component and receives six arguments: dialog, editors, labels, tabs, layout, and taskOrComment.- 'dialog': The 'smart-window' instance representing the Kanban dialog.- 'taskOrComment': An object representing either the current Kanban task or a comment, depending on the context in which the dialog is opened.- 'editors, labels, tabs, layout': Each is a JSON object where keys specify the element type (e.g., 'description', 'priority', 'notes'), and the values are their corresponding HTML elements within the dialog.This function allows developers to customize the dialog content or behavior dynamically based on the element types and the associated data when the dialog is rendered.
DdataSourceSpecifies the origin or source of the data to be displayed and managed on the Kanban board, such as an API endpoint, database, or local data array. This setting dictates which dataset will populate the Kanban columns and cards. Click for more details. Property object's options:
  • id:string | number - The task's unique ID.
  • checklist:{ completed?: boolean, text?: string }[] - A list of sub-tasks.
  • color:string - A color used to highlight the task's card visually.
  • comments:{ text?: string, time?: Date, userId: string | number }[] - Comments about a task.
  • dueDate:Date - The task's due date.
  • priority:string - The task's priority.
  • progress:number - The task's progress in percentages - a number from 0 to 100.
  • startDate:Date - The task's start date.
  • status:string - The task's status. Has to correspond to the dataField of a column or sub-column from the columns property/array.
  • swimlane:string - The swimlane of the task. Has to correspond to the dataField of a swimlane from the swimlanes property/array, if it is defined.
  • tags:string - A comma-separated list of tags.
  • text:string - The text of the task.
  • userId:string | number - The ID of the user assigned to the task. Has to correspond to the id of an item from the users property/array.
DdataSourceMapSpecifies how the Kanban board's default fields (e.g., title, status, assignee) correspond to the fields in your data source. Use this mapping only if your data source uses field names that differ from the Kanban's expected keywords. If the field names already match, this mapping is optional. Note that only certain default fields support custom mapping; not all default mappings can be overridden.
DdragOffsetSpecifies the offset, in pixels, between the drag feedback element and the mouse cursor during task dragging operations. The value should be provided as an array: the first element sets the horizontal (x-axis) offset, and the second element sets the vertical (y-axis) offset, both relative to the cursor position. Alternatively, if set to 'auto', the system automatically calculates the offset based on the cursor’s position at the moment the drag action began. This allows for precise control over the visual positioning of the feedback element during drag-and-drop interactions.
EeditableControls whether tasks can be modified, including editing task details and assigning users to tasks. When enabled, users can update task information and manage task assignments; when disabled, tasks and their assigned users are read-only and cannot be changed programmatically or through the user interface.
EeditModeSpecifies how users can activate the task editing feature. The 'editBehavior' property accepts either '"singleClick"' or '"doubleClick"' as values:- '"singleClick"': Opens the dialog edit window when the user clicks once on a Kanban task.- '"doubleClick"' (default): Opens the dialog edit window when the user double-clicks on a Kanban task.By default, editing is triggered by a double-click. Use this setting to customize the interaction based on your application's needs.
FformatStringDateSets or retrieves the format string used to display the "Due date" label, as well as the date format for both the "Start date" and "Due date" editor fields. This determines how dates are shown and entered in these UI components.
FformatStringTimeSpecifies or retrieves the format string used to display the timestamp on comments. This determines how the date and time of each comment are presented (e.g., "YYYY-MM-DD HH:mm:ss").
HheaderPositionSets or retrieves the position of the header section within the user interface. The header typically contains interactive controls such as Customize, Filter, Sort, and Search buttons, allowing users to adjust and manipulate the displayed data according to their preferences.
HhierarchyDefines or retrieves how the column hierarchy is structured and displayed, specifying the method or format used to represent the relationships between columns within the component or dataset.
UunlockKeyGets or sets the unlockKey property, a unique key used to unlock or activate the product. This key is required to enable full access to product features.
LlocaleSets or retrieves the current locale (language and regional settings) used by the component. This property determines the language in which messages are displayed, and works together with the messages property, which provides localized message strings for each supported locale. Adjusting the locale will change the displayed text to correspond with the selected language from the messages definitions.
MmessagesDefines or retrieves an object containing the strings displayed in the widget, allowing for easy localization of text. This property works together with the locale property to support multiple languages and adapt the user interface based on the selected locale. Use this to provide translated labels, messages, and other widget text for internationalization.
OonTaskRenderCallback function that allows you to customize how tasks are rendered within the Kanban board. This function is invoked by the Kanban component and receives two arguments: 1. The HTML element representing the task (taskHtmlElement).2. The data object associated with the task (taskData).You can use this callback to modify the appearance, add event listeners, or inject additional content into the task's HTML element based on its data.
OonFilterPrepareCallback function that enables customization of the filter items displayed in the dropdown. It receives a single argument: an array containing all the items available for filtering. Within the function, you can modify this array—such as by updating, removing, or reordering items—to control which options appear in the filter dropdown and how they are presented to the user. The modified array will determine the final set of filter options shown in the UI.
OonSortPrepareA callback function that allows you to customize the items displayed in the sort dropdown menu. This function receives a single argument: an array containing all available sort options. You can modify this array—by removing, reordering, or updating items—to control which sorting options appear in the dropdown and how they are presented. The modified array will then be used to render the sort options to the user.
OonColumnHeaderRenderCallback function that allows customization of the column header rendering in the Kanban component. This function is invoked with three arguments: the column header's HTML element, the complete column data object, and the column's data field (a string representing the key associated with the column). Use this callback to modify or enhance the appearance and behavior of column headers as needed.
OonColumnFooterRenderCallback function that allows you to customize how the column footer is rendered in the Kanban component. This function is invoked with three arguments:1. The HTML element representing the column header2. The data object for the current column3. The field name associated with the column dataUse this callback to modify the footer's appearance or content based on the specific column's properties and data.
SselectionModeSpecifies how items can be selected within the component, such as allowing single selection, multiple selections, or disabling selection entirely.
SstoreHistorySpecifies whether the history of tasks is recorded and shown within the task dialog. When enabled, completed or previous tasks will be saved and displayed, allowing users to review their task activity directly in the dialog. When disabled, task history will not be retained or visible. This setting can be used to set or retrieve the current history display behavior.
SstoreHistoryItemsSpecifies the collection of task history items to be retrieved or updated when the storeHistory option is enabled. When storeHistory is true, this property determines which task history records are saved and accessed.
RrightToLeftSets or retrieves a value that determines whether the element’s alignment is configured for right-to-left (RTL) text direction, which is typically used in languages such as Arabic or Hebrew. When enabled, the element layout and text flow will support RTL locales, ensuring proper display for right-to-left scripts.
RreadonlyControls the read-only state of the edit dialog. When enabled, the dialog displays task details but disables all editing capabilities for those fields. However, if the comments feature is active, users can still add comments within the dialog, even while other fields remain uneditable.
SswimlanesProvides a detailed configuration of swimlanes on the Kanban board, specifying how tasks are grouped horizontally by categories such as assignee, priority, or project. When swimlanes are enabled, sub-columns within each column are disabled to maintain a clear visual separation of items across swimlanes. Click for more details. Property object's options:
  • color:string - The swimlane's color.
  • dataField:string - Sets or gets the swimlane's data source bound field. Corresponds to the swimlane field in the data source.
  • label:string - Sets or gets the text displayed in the swimlane.
SswimlanesFromSpecifies or retrieves the zero-based index of the column where the swimlanes should begin. This determines the starting position for rendering swimlanes within a grid or table layout.
SswimlanesToSpecifies or retrieves the zero-based index of the column where the swimlanes should terminate. By default, swimlanes extend to the final column in the layout. Setting this property allows you to control at which column the swimlanes will stop, providing flexibility in customizing the swimlane display.
TtagsSpecifies the permitted tags that can be used. When this property is set, only the listed tags will be allowed; if no tags are specified, all tags provided by the data source are accepted by default. This property can be used to restrict or expand the selection of allowed tags as needed.
TtaskActionsControls whether the task actions icon is displayed or hidden, allowing users to show or conceal the icon based on their preferences or application state.
TtaskActionsRenderedDefines a callback function that is invoked whenever the task actions menu is generated in the UI. This function receives the actions menu element as its parameter, enabling you to modify or extend the menu's content and behavior. For example, you can insert custom menu items, attach event listeners, or alter existing elements within the menu.'Example usage:''''js(list) => { // Add a custom menu item list.innerHTML = '
Custom Item
'; // Attach a click handler to the menu list.onclick = () => { alert('Custom item clicked'); };}'''This callback provides full access to the task actions menu element, empowering you to tailor the menu to fit your specific requirements.
TtaskCommentsControls whether the task comments icon is displayed or hidden, allowing you to show or conceal the icon associated with task comments.
TtaskDueControls whether the task due date icon is shown or hidden in the interface. When enabled, the icon indicating a task's due date will be visible; when disabled, the icon will be hidden from view.
TtaskPositionDetermines whether tasks are displayed across all levels of the column hierarchy or are restricted to only the leaf (lowest-level) columns. When enabled, tasks can be shown in any column within the hierarchy; when disabled, tasks are displayed exclusively in the leaf columns. This setting allows you to control the visibility of tasks based on the column hierarchy structure.
TtaskPriorityControls whether the task priority icon is displayed. The icon appears when a task is marked as either low or high priority. Disabling this option will hide the icon regardless of the task’s priority status.
TtaskProgressControls whether the task progress bar and the label displaying the number of completed sub-tasks are shown or hidden. When enabled, both visual elements will be visible; when disabled, they will be hidden from view.
TtaskCustomFieldsDefines which custom fields are shown on a task card and how they appear. This property accepts an array of objects, where each object represents a custom field configuration with the following properties:- 'dataField' (string, required): Specifies the unique key or identifier for the custom field. This determines which value will be displayed on the card.- 'label' (string, required): The display name or title of the field as it appears on the card.- 'dataType' (string, required): Indicates the field's data type (e.g., 'string', 'number', 'date'). Used to determine how the field value should be formatted or displayed.- 'visible' (boolean, optional): If set to 'true', the field is displayed on the card; if 'false', it is hidden. Defaults to 'true' if omitted.- 'image' (boolean, optional): Set to 'true' if the field value is an image URL or Base64 string. This tells the UI to render the value as an image instead of text.- 'cover' (boolean, optional): When 'image' is 'true', setting 'cover' to 'true' will display the image as the card’s cover image (typically at the top of the card).'Example usage:''''json[ { "dataField": "title", "label": "Task Title", "dataType": "string", "visible": true }, { "dataField": "dueDate", "label": "Due Date", "dataType": "date" }, { "dataField": "avatar", "label": "Assignee Photo", "dataType": "string", "image": true, "visible": true }, { "dataField": "coverImage", "label": "Project Cover", "dataType": "string", "image": true, "cover": true }]'''This configuration determines which fields are shown, how they're labeled, their format, and whether any field displays an image or acts as a cover image on the task card.
TtaskColorEntireSurfaceThe background color of a task is determined by its individual color property. By default, this color is visually represented as an accent along the left border of the task element, rather than filling the entire background. This design helps differentiate tasks based on their assigned colors while maintaining a consistent overall appearance.
TtaskSubTasksInputDisplays an input field within the task card, allowing users to dynamically add sub-tasks to the main task. To enable this feature, ensure that the 'taskSubTasks' property is set to a value other than 'none'. When 'taskSubTasks' is appropriately configured, users will see and be able to use the sub-task input interface.
TtaskSubTasksSpecifies how sub-tasks are rendered within a task card. - '"none"' *(default)*: Sub-tasks are hidden on the task card and are only visible within the edit dialog. - '"onePerRow"': All sub-tasks associated with the task are displayed directly on the task card, with each sub-task shown on its own row. - '"onlyUnfinished"': Only sub-tasks that are not marked as completed are displayed on the task card; completed sub-tasks remain hidden.
TtaskTagsControls whether task tags are shown or hidden in the user interface, allowing users to display or conceal tag information associated with each task.
TtaskUserIconControls whether the task user icon is displayed or hidden, allowing you to show or hide the icon representing the user associated with a task.
TtextTemplateSpecifies the template to use for rendering task text. This property accepts multiple value types:- A string starting with #, which references the id of a <template> element on the page. The contents of this element will be used as the template.- A string containing HTML or template markup, which will be parsed and applied directly to the task text.- A function, which receives the task text (or a template) as input and returns the modified text or template to be used.This property can be both set to define the template for future tasks, or retrieved to access the currently applied template.
TthemeSpecifies the theme applied to the element. The theme controls the visual appearance, including colors, fonts, and overall style, ensuring a consistent look and feel across the component.
PpriorityListControls the visibility of the priority list (as specified by the priority property) when the user clicks the priority icon. This option is only effective when users have editable privileges enabled, allowing them to modify the priority value. If set to true, the list will appear on icon click; if false, the list will remain hidden.
PprioritySpecifies the available priority levels that can be assigned to Kanban tasks. This array defines each priority as an object containing a label (for display purposes) and a corresponding value (for internal use). Example: [{label: 'Low', value: 'low'}, {label: 'High', value: 'high'}] Use this property to customize or extend the set of priority options in your Kanban board.
UuserListControls the visibility of the user list—defined by the users property—when the user icon is clicked. This setting is only effective if editable privileges are enabled; otherwise, the user list will not be displayed regardless of this option.
UusersSpecifies the users eligible to be assigned Kanban tasks, along with their associated attributes (such as name, role, and status) and permissions (such as create, edit, or delete task capabilities). Click for more details. Property object's options:
  • allowAdd:boolean - Sets whether the user has a privilege to add or copy tasks.
  • allowComment:boolean - Sets whether the user has a privilege to add comments to tasks.
  • allowDrag:boolean - Sets whether the user has a privilege to drag tasks. Works along with the property allowDrag.
  • allowEdit:boolean - Sets whether the user has a privilege to edit tasks. Works along with the property editable.
  • allowRemove:boolean - Sets whether the user has a privilege to remove tasks.
  • id:string | number - The user's unique ID. Corresponds to the userId field in the data source and the property currentUser.
  • image:string - A url to an image representing the user.
  • name:string - The user's name as it will appear in the Users list and "Assigned to" editor.

Events

CchangeThis event is triggered whenever any changes are made to the details, status, or properties of an existing task. It allows you to respond programmatically whenever a task is modified, ensuring your application can stay synchronized with the latest task information.
CcloseThis event is triggered when the user closes the edit or prompt dialog, either by submitting changes or canceling the operation. It signals that the dialog has been dismissed and any associated actions, such as saving or discarding input, should be handled.
CclosingThis event fires just before the edit or prompt dialog is about to close, giving you an opportunity to intercept the closing action. By calling event.preventDefault() within the event handler, you can cancel the closing operation, allowing you to perform validation or prompt the user before the dialog is dismissed.
CcolumnAddThis event is triggered whenever a new column is successfully added to the data structure or interface. It allows you to respond to the addition of a column, such as updating the user interface, modifying related data, or performing custom logic. The event provides details about the added column, including its name, index, and relevant metadata.
CcolumnRemoveThis event is triggered whenever a column is deleted or removed from the data structure, table, or grid. It provides an opportunity to handle any necessary updates or clean-up tasks related to the removal of a column, such as updating the user interface, adjusting data bindings, or modifying underlying data sources. The event typically includes information about the column that was removed, allowing developers to respond dynamically to changes in the structure.
CcolumnReorderThis event is triggered whenever a user changes the position of a column, such as by dragging and dropping a column header to rearrange the column order in the table.
CcolumnUpdateThis event is triggered whenever the data in a column is updated. It occurs after any changes are made to the value(s) of a column, providing an opportunity to respond to or process the updated data. Listeners can use this event to execute custom logic, such as validating input, persisting changes, or updating related UI components.
CcolumnClickThis event is triggered whenever a user clicks on a column header within the data table. It can be used to initiate actions such as sorting the column, displaying a menu, or highlighting the selected column. The event typically provides information about which column was clicked, enabling you to implement custom logic based on the user's interaction.
CcolumnDoubleClickThis event is triggered when a user double-clicks on a column header, typically in a data grid or table. It can be used to initiate actions such as resizing the column, sorting data, or displaying additional options related to the selected column.
CcolumnShowThis event is triggered whenever a column becomes visible—either when a user selects the "Show" option from the column's action menu, or when the Kanban component's `show` method is programmatically called to reveal the column.
CcolumnHideThis event is triggered whenever a column is hidden, either through the column's action menu or programmatically via the Kanban board’s `hide` method. Use this event to execute custom logic or UI updates whenever a column becomes invisible to the user.
CcolumnCollapseThis event is triggered whenever a column is collapsed, either by selecting the "Collapse" option from the column's action menu or by programmatically invoking the Kanban board's `collapse` method.
CcolumnExpandThis event is triggered whenever a column in the Kanban board is expanded, either by a user selecting the "expand" option from the column's action menu or programmatically through the Kanban component's `expand` method.
CcommentAddThis event is triggered whenever a user adds a comment to a task within the Kanban board. It activates immediately after the comment is successfully posted, allowing you to respond to or process new task comments in real-time.
CcommentRemoveThis event is triggered whenever a comment is deleted from a task card within the Kanban board. It allows you to perform actions or updates in response to the removal of a comment from any Kanban task.
CcommentUpdateThis event is triggered whenever an existing comment on a Kanban Task is modified. It occurs after any changes are made to the comment’s content, such as edits or updates, allowing you to respond to or track comment modifications within the Kanban board.
DdragEndThis event is triggered when a task is dropped onto a target element within the DOM during a drag-and-drop operation. It allows developers to handle the completion of a drag action by responding to where the task is released. To prevent the default drop behavior—such as moving the element or initiating a browser action—you can call event.preventDefault() within the event handler. This enables you to implement custom logic for handling dropped tasks, such as updating data models, modifying the UI, or triggering other application-specific actions."
DdraggingThis event is triggered while the user is actively dragging a task, such as during a drag-and-drop operation. It fires continuously as the task is being moved, enabling real-time updates or visual feedback in response to the task's position.
DdragStartThis event is fired when the user initiates a drag action on one or more tasks. During the event, you can access information about the tasks being dragged. If you want to prevent the drag-and-drop operation from starting, you can call event.preventDefault() inside your event handler. This will cancel the dragging process and prevent any associated drag logic or UI changes from occurring.
FfilterThis event is triggered immediately after a user applies a filter to refine the displayed data. It indicates that the filter criteria have been set and the view has been updated accordingly. Developers can use this event to perform actions such as fetching new data, updating UI elements, or logging user interactions related to filtering.
OopenThis event is triggered whenever the edit or prompt dialog window is displayed to the user. It signals that the user interface has opened a dialog for editing content or requesting input, allowing developers to execute custom logic in response to the dialog becoming visible.
OopeningThis event is fired immediately before the edit or prompt dialog is displayed. You can intercept and prevent the dialog from opening by calling event.preventDefault() within your event handler. This allows you to provide your own custom dialog or take other actions instead of showing the default Kanban dialog. To stop the default Kanban dialog from appearing, simply call event.preventDefault() in the appropriate event handler function.
SsortThis event is triggered immediately after a sorting operation has been applied to the data set. It signifies that the data has been reordered based on the selected sorting criteria, and any relevant updates or UI refreshes can be performed in response to this change. The event may provide details about the sort field(s), direction (ascending or descending), and the affected data.
TtaskBeforeAddThis event is fired immediately before a new task is added to the Kanban board. Within the event handler, you can access and modify the task's initial data using event.detail.value (which contains the task details) and event.detail.id (which represents the task's unique identifier). This allows you to customize attributes—such as assigning a specific ID or updating field values—before the task is officially added. **Example usage:**```jskanban.onTaskBeforeAdd = (event) => { const taskData = event.detail.value; // the task data before it is added const currentId = event.detail.id; // the proposed task ID event.detail.id = 'BG12'; // assign a custom ID before adding // Additional custom logic can be added here};```**Note:** Make any necessary changes to `event.detail.value` or `event.detail.id` within this handler to control how tasks are created and represented on your Kanban board.
TtaskAddThis event fires whenever a new task is added to the Kanban board. The associated event object contains detailed information about the new task, accessible via the event's detail property. **Example usage:**```javascriptkanban.onTaskAdd = (event) => { const taskData = event.detail.value; // Contains the properties of the newly added task const taskId = event.detail.id; // Unique identifier of the new task}```**Description:** Use this event to execute custom logic or update your application whenever a user creates a new task. The `event.detail.value` provides the complete task data object, while `event.detail.id` gives you the unique ID assigned to that task.
TtaskRemoveThis event is triggered whenever a task is deleted or removed from the system. It occurs immediately after a task is successfully deleted, allowing you to perform any necessary cleanup, updates, or notifications in response to the removal action.
TtaskUpdateThis event is triggered whenever a task undergoes an update, such as changes to its status, description, assigned users, due date, or any other task-related property. It allows listeners to respond in real time to modifications made to existing tasks.
TtaskClickThis event is fired when a user clicks on a task item, allowing you to execute custom logic in response to the interaction. It provides details about the clicked task, enabling you to access its data or update its state as needed.
TtaskDoubleClickThis event is triggered when a user double-clicks on a task element in the interface. It allows you to detect and respond to double-click actions performed specifically on individual tasks, enabling functionalities such as editing, viewing task details, or initiating other custom behaviors associated with a double-click interaction.

Methods

AaddFilterEnables advanced filtering functionality for the data. For example, you can create a `Smart.FilterGroup` object to build complex filters. You might define a filter that checks if a 'Country' field contains the string 'Italy':```javascriptconst filterGroup = new Smart.FilterGroup();const filterObject = filterGroup.createFilter('string', 'Italy', 'contains');filterGroup.addFilter('and', filterObject);kanban.addFilter([['Country', filterGroup]]);```In this example, a filter group is created. A filter is then defined to match records where the 'Country' column contains the text 'Italy'. This filter is combined into the group with a logical 'and' operator and finally applied to the Kanban board using the `addFilter` method. This approach supports combining multiple filters with logical operators for dynamic and flexible data querying.
AaddSortEnables customizable sorting functionality for your kanban board data. You can specify one or more fields to sort by, along with the desired sort order (e.g., 'ascending' or 'descending'). Example usage: kanban.addSort(['Country'], 'ascending'); This will sort the kanban items in ascending order based on the 'Country' field. You can also pass multiple fields (e.g., kanban.addSort(['Country', 'Name'], 'descending')) to create multi-level sorting.
AaddTaskAdds a new task to a specified Kanban column. If no column or task data is provided, an empty task with default values will be created and placed in the first column of the Kanban board.
AaddColumnAdds a new column to the Kanban board. If no column data is provided, a blank column with default settings will be created and added. If column data is specified, the column will be initialized with the provided properties.
BbeginEditInitiates an edit operation, allowing modifications to be made to the current data or document. This operation typically marks the start of a transaction, enabling changes to be tracked and either saved (committed) or discarded (rolled back) upon completion.
CcancelEditTerminates the ongoing edit operation and reverts all unsaved changes, restoring the data to its previous state before the edit began.
CclosePanelCloses any currently open header panel dropdown, ensuring that all active dropdown menus within the header section are hidden from view.
CcollapseCollapses a Kanban column, minimizing its contents and reducing its width to provide a more compact view of the board. This action hides the tasks within the column while keeping the column header visible, allowing users to focus on other sections of the Kanban board.
CclearSelectionRemoves any currently selected items or cards within the Kanban board, ensuring that no items remain selected. This action resets the selection state of the Kanban component.
HhideConceals a specific column within a Kanban board, making its contents and tasks temporarily invisible to users without deleting any data. This action helps declutter the board or focus attention on other columns. The hidden column can typically be shown again through board settings or controls.
CcopyTaskCreates a duplicate of an existing task within the same column, preserving all task details such as title, description, assignees, and deadlines. The copied task will appear alongside the original in the same column, allowing for easy modification without affecting the original task.
EendEditCompletes the current editing session by finalizing any modifications made and persisting all changes to the underlying data source.
EensureVisibleEnsures that the specified task is brought into view within the scrollable container by automatically scrolling to its position. If the operation is successful, the method returns the corresponding HTML element representing the task.
EexpandExpands a Kanban board column to display all its contents, allowing users to view every card within the column in detail. This functionality makes it easier to manage, organize, and interact with all items in the selected column.
EexpandAllExpands every Kanban column to display all hidden or collapsed tasks, ensuring that all items within each column are fully visible.
EexportDataExports all current data from the Kanban board, including task details, statuses, columns, and any associated metadata, into a structured format (such as JSON or CSV) for backup, sharing, or integration purposes.
GgetColumnRetrieves detailed information about a specific column. The returned value is a JSON object containing the following fields:- label: The display name of the column.- dataField: The key or property name associated with the column's data.- collapsed: A boolean indicating whether the column is currently collapsed.- collapsible: A boolean specifying if the column can be collapsed or expanded by the user.- allowRemove: A boolean that determines whether the column can be removed from the view.- editable: A boolean indicating if the column's cells are editable.- reorder: A boolean specifying whether the column can be reordered by the user.- orientation: Describes the orientation of the column, such as "horizontal" or "vertical".Use this object to access or modify the configuration and behavior of the column in your application interface.
GgetTaskRetrieves detailed information about a specific task. The returned value is a JSON object containing the following fields:- checklist: An array of checklist items associated with the task - id: The unique identifier for the task - color: A string representing the task label or color code - comments: An array of comment objects related to the task - history: An array that records the chronological history of changes and activity for the task - dueDate: The date and time when the task is due - startDate: The date and time when the task is scheduled to start - priority: The task's priority level (e.g., low, medium, high) - progress: The percentage of task completion - status: The current status of the task (e.g., open, in progress, completed) - swimlane: The swimlane or category the task is assigned to - tags: An array of tags or keywords associated with the task - text: The task title or main summary - description: Detailed information about the task - userId: The identifier of the user currently assigned to the task - createdUserId: The identifier of the user who created the task - createdDate: The date and time when the task was created - updatedUserId: The identifier of the user who last updated the task - updatedDate: The date and time when the task was last updated This structured JSON object enables developers to access all relevant attributes for rendering and managing tasks within an application.
GgetSelectedTasksRetrieves the IDs of all selected tasks. The returned value is an array, where each element represents the unique 'id' associated with a selected task. If no tasks are selected, the array will be empty.
GgetStateRetrieves the current state of the Kanban board as a comprehensive object. The returned object contains detailed information about the board's configuration and user interactions, structured as follows:```typescript{ collapsed: { // Tracks which Kanban columns or swimlanes are currently collapsed. // Keys represent the column or swimlane identifiers, and values indicate their collapsed state. [key: string]: boolean; }, dataSource: [ // An array of data objects representing all Kanban tasks/cards currently on the board. // Each item typically includes task details such as id, status, title, description, etc. ], filtering: { filters: [ // Array of filter objects currently applied. // Each filter describes criteria such as field, comparison operator, and value. ], operator: string; // Logical operator ("AND"/"OR") used to combine multiple filters. }, selection: { selected: [ // Array of IDs or references of currently selected tasks/cards. ], selectionStart?: number | string; // Optional: Identifies the first item in a selection range (useful for range selection with shift-click). selectionInColumn: string; // ID or name of the column where selection started or is active. swimlane: string; // ID or name of the currently active swimlane (if swimlanes are in use). }, sorting: { dataFields: [ // Array of fields currently used to sort the Kanban data (e.g., ["priority", "dueDate"]). ], dataTypes: [ // Corresponding data types for each sorting field (e.g., ["number", "date"]). ], orderBy: [ // Sort directions corresponding to each field ("asc" or "desc"). ] }, tabs: [ // List of tab states or identifiers, reflecting open and active views within the Kanban UI. ], visibility: { taskActions: boolean; // Whether task action buttons are visible. taskComments: boolean; // Whether task comments are shown. taskDue: boolean; // Whether due date indicators are visible. taskPriority: boolean; // Whether task priority display is enabled. taskProgress: boolean; // Whether task progress bars or indicators are shown. taskTags: boolean; // Whether tags associated with tasks are visible. taskUserIcon: boolean; // Whether user or assignee icons are visible on tasks. }}```This state object enables you to persist, inspect, or restore the Kanban board’s full interactive state, including data, UI settings, filters, sortings, selections, and visibility toggles. It is suitable for use cases such as saving the user’s workspace, synchronizing state across sessions, or debugging Kanban board behavior.
LloadStateRetrieves and initializes the current state of the Kanban board, including all columns, tasks, and their respective statuses, to ensure the user sees the latest project information.
MmoveTaskMoves a specified task from its current column to a target column within the workflow or board, updating its status and position accordingly.
OopenCustomizePanelDisplays the "Customize Tasks" header panel as a dropdown menu, allowing users to access and modify task customization options.
OopenFilterPanelDisplays the "Filter" panel by opening its dropdown menu in the header section, allowing users to access and apply filtering options.
OopenSortPanelDisplays the "Sort" header panel as a dropdown menu, allowing users to select sorting options for the displayed data.
RremoveFilterRemoves all applied filters, displaying the complete, unfiltered dataset.
RremoveSortDisables any previously applied sorting, returning the data to its original, unsorted order.
RremoveTaskDeletes a specified task from the task list, permanently removing it from the data store.
RremoveColumnRemoves a specified column from the data set or table, effectively deleting all data contained within that column and updating the structure to reflect its absence. This operation is irreversible and affects any processes or queries that rely on the removed column.
SsaveStatePersists the current state of the Kanban board—including all columns, cards, and their order—to the browser's localStorage. This ensures that the user's board layout and content are retained and automatically restored when the page is reloaded or the browser is reopened.
SshowDisplays a single Kanban column, including the column title and a list of tasks or cards assigned to that column. Ideal for use in Kanban boards to visually organize tasks by status or category within a workflow.
SshowAllColumnsDisplays a comprehensive list of all Kanban columns, including their names, order, and relevant metadata. This allows users or applications to view the complete structure of the Kanban board and manage workflow stages effectively.
SselectTaskSelects a specific task from a list or collection, allowing the application to retrieve or highlight the chosen task's details for further actions such as viewing, editing, or managing it.
UunselectTaskDeselects a previously selected task, removing its active or highlighted status within the user interface.
UupdateTaskUpdates the details of an existing task, such as its title, description, status, due date, or assigned user.
UupdateColumnUpdates the value of a specified column in a database table. This operation allows you to modify existing data by providing the column name and the new value to be set. Optionally, you can specify conditions to ensure that only rows matching certain criteria are updated.

Properties

allowColumnReorderboolean

Controls whether users can reorder columns in a table or grid. When set to true and used in combination with allowDrag enabled, this property lets users rearrange columns by dragging and dropping their headers. For example, a user can click and hold the header of the first column, then drag it to a new position over another column header and drop it, changing the column order visually and functionally. This enhances the user experience by allowing customizable column layouts.

Default value

false

Example

Set the allowColumnReorder property.

 <smart-kanban allow-column-reorder></smart-kanban>

Set the allowColumnReorder property by using the HTML Element's instance.

 const kanban = document.querySelector('smart-kanban');
 kanban.allowColumnReorder = false;

Get the allowColumnReorder property.

 const kanban = document.querySelector('smart-kanban');
 let allowColumnReorder = kanban.allowColumnReorder;

allowColumnEditboolean

Controls whether column editing is permitted. When this property is set to true, users can dynamically edit the column's header label by double-clicking on it. This allows for in-place renaming of the column header directly within the user interface. If set to false, the column header label will remain static and cannot be modified by users.

Default value

false

Example

Set the allowColumnEdit property.

 <smart-kanban allow-column-edit></smart-kanban>

Set the allowColumnEdit property by using the HTML Element's instance.

 const kanban = document.querySelector('smart-kanban');
 kanban.allowColumnEdit = false;

Get the allowColumnEdit property.

 const kanban = document.querySelector('smart-kanban');
 let allowColumnEdit = kanban.allowColumnEdit;

allowColumnRemoveboolean

Controls whether users can remove columns from the table. When set to true, a "Remove Column" option will appear in the column actions menu, allowing users to dynamically delete columns. Note: The 'columnActions' property must also be enabled (set to true) for this feature to be available.

Default value

false

Example

Set the allowColumnRemove property.

 <smart-kanban allow-column-remove></smart-kanban>

Set the allowColumnRemove property by using the HTML Element's instance.

 const kanban = document.querySelector('smart-kanban');
 kanban.allowColumnRemove = false;

Get the allowColumnRemove property.

 const kanban = document.querySelector('smart-kanban');
 let allowColumnRemove = kanban.allowColumnRemove;

allowColumnHideboolean

Controls whether users can hide columns in the data table. When set to true, this property allows users to dynamically hide individual columns using the column actions menu. Note: To enable this feature, the 'columnActions' property must also be set to true.

Default value

false

Example

Set the allowColumnHide property.

 <smart-kanban allow-column-hide></smart-kanban>

Set the allowColumnHide property by using the HTML Element's instance.

 const kanban = document.querySelector('smart-kanban');
 kanban.allowColumnHide = false;

Get the allowColumnHide property.

 const kanban = document.querySelector('smart-kanban');
 let allowColumnHide = kanban.allowColumnHide;

addNewButtonboolean

Controls whether the "Add Task" button is displayed at the top of each column. To hide the button for an individual column, set the addNewButton property to false within that column’s configuration object. If addNewButton is false, users will not see the "Add Task" button for that specific column.

Default value

false

Example

Set the addNewButton property.

 <smart-kanban add-new-button></smart-kanban>

Set the addNewButton property by using the HTML Element's instance.

 const kanban = document.querySelector('smart-kanban');
 kanban.addNewButton = false;

Get the addNewButton property.

 const kanban = document.querySelector('smart-kanban');
 let addNewButton = kanban.addNewButton;

addNewButtonDisplayMode"top" | "bottom" | "both"

Specifies whether the add button appears in the column header, after the list of tasks within the column, or both. This controls the visibility and placement of the add button for creating new tasks in each column.

Default value

"both"

Example

Set the addNewButtonDisplayMode property.

 <smart-kanban add-new-button-display-mode='both'></smart-kanban>

Set the addNewButtonDisplayMode property by using the HTML Element's instance.

 const kanban = document.querySelector('smart-kanban');
 kanban.addNewButtonDisplayMode = 'top';

Get the addNewButtonDisplayMode property.

 const kanban = document.querySelector('smart-kanban');
 let addNewButtonDisplayMode = kanban.addNewButtonDisplayMode;

addNewColumnboolean

Specifies whether a special column containing a button for adding new status columns to the Kanban board is shown. When enabled, this feature allows users to quickly create additional status columns directly within the Kanban interface. You can use this setting to display or hide the "Add Column" button column as needed.

Default value

false

Example

Set the addNewColumn property.

 <smart-kanban add-new-column></smart-kanban>

Set the addNewColumn property by using the HTML Element's instance.

 const kanban = document.querySelector('smart-kanban');
 kanban.addNewColumn = false;

Get the addNewColumn property.

 const kanban = document.querySelector('smart-kanban');
 let addNewColumn = kanban.addNewColumn;

addNewColumnWidthnumber | null

Specifies the width of the dynamically added "Add New" column. This property is effective only when the 'columnWidth' property is also set. It allows you to control the exact width (in pixels or other valid CSS units) of the new column that appears when adding columns dynamically to the table or grid.

Example

Set the addNewColumnWidth property.

 <smart-kanban add-new-column-width='null'></smart-kanban>

Set the addNewColumnWidth property by using the HTML Element's instance.

 const kanban = document.querySelector('smart-kanban');
 kanban.addNewColumnWidth = 300;

Get the addNewColumnWidth property.

 const kanban = document.querySelector('smart-kanban');
 let addNewColumnWidth = kanban.addNewColumnWidth;

allowDragboolean

Enables users to click and drag tasks within the interface, allowing them to easily reorder, move, or reorganize tasks by dragging and dropping them to the desired position.

Default value

true

Example

Set the allowDrag property.

 <smart-kanban allow-drag></smart-kanban>

Set the allowDrag property by using the HTML Element's instance.

 const kanban = document.querySelector('smart-kanban');
 kanban.allowDrag = false;

Get the allowDrag property.

 const kanban = document.querySelector('smart-kanban');
 let allowDrag = kanban.allowDrag;

allowDropboolean

Enables users to remove or discard tasks from the list or workflow, either by dragging and dropping or through a designated action, facilitating task management and organization.

Default value

true

Example

Set the allowDrop property.

 <smart-kanban allow-drop></smart-kanban>

Set the allowDrop property by using the HTML Element's instance.

 const kanban = document.querySelector('smart-kanban');
 kanban.allowDrop = false;

Get the allowDrop property.

 const kanban = document.querySelector('smart-kanban');
 let allowDrop = kanban.allowDrop;

allowDropPlaceholderboolean

Enables a visual placeholder to appear when dragging and dropping tasks. As you drag a task over another task, an empty space is dynamically created at the drop location, clearly indicating where the dragged task will be inserted. This improves usability by providing real-time visual feedback during task reordering.

Default value

false

Example

Set the allowDropPlaceholder property.

 <smart-kanban allow-drop-placeholder></smart-kanban>

Set the allowDropPlaceholder property by using the HTML Element's instance.

 const kanban = document.querySelector('smart-kanban');
 kanban.allowDropPlaceholder = false;

Get the allowDropPlaceholder property.

 const kanban = document.querySelector('smart-kanban');
 let allowDropPlaceholder = kanban.allowDropPlaceholder;

applyColumnColorToTasksboolean

This property controls the color styling of Kanban columns and their associated tasks. When set to true, and if a Kanban column has its color property defined, that color will not only visually highlight the column header but will also be applied to all tasks within that column, as well as to the background or accent color of the edit dialog for tasks in that column. This creates a consistent and visually cohesive color scheme throughout each column and its related UI elements.

Default value

false

Example

Set the applyColumnColorToTasks property.

 <smart-kanban apply-column-color-to-tasks></smart-kanban>

Set the applyColumnColorToTasks property by using the HTML Element's instance.

 const kanban = document.querySelector('smart-kanban');
 kanban.applyColumnColorToTasks = false;

Get the applyColumnColorToTasks property.

 const kanban = document.querySelector('smart-kanban');
 let applyColumnColorToTasks = kanban.applyColumnColorToTasks;

autoLoadStateboolean

Controls whether the application automatically loads its state from the browser’s localStorage. This includes restoring information such as:

- The list of tasks and their positions
- The selected task and its state
- Applied filters and sorting options
- The state of collapsed columns
- The values of the following task-related properties:
- taskActions
- taskComments
- taskDue
- taskPriority
- taskProgress
- taskTags
- taskUserIcon

When enabled, all of these details will be reloaded from localStorage on page refresh or reopening the application, ensuring a consistent user experience. When disabled, this information will not be loaded automatically, and the state will not be restored.

Default value

true

Example

Set the autoLoadState property.

 <smart-kanban auto-load-state></smart-kanban>

Set the autoLoadState property by using the HTML Element's instance.

 const kanban = document.querySelector('smart-kanban');
 kanban.autoLoadState = false;

Get the autoLoadState property.

 const kanban = document.querySelector('smart-kanban');
 let autoLoadState = kanban.autoLoadState;

autoSaveStateboolean

Controls whether the application's current state is automatically saved to the browser's localStorage. When enabled, the following information is persistently stored and restored across sessions:

- Task data, including their current positions, selected status, and any applied filters or sorting.
- The collapsed or expanded state of columns.
- Values for the following properties:
- taskActions (user actions related to tasks)
- taskComments (comments attached to tasks)
- taskDue (task due dates)
- taskPriority (priority level of tasks)
- taskProgress (progress tracking for tasks)
- taskTags (tags associated with each task)
- taskUserIcon (user avatars/icons linked to tasks)

This ensures that user preferences and the state of the task interface are preserved, providing a seamless user experience even after closing or refreshing the browser. Disabling this feature will prevent any state information from being stored in localStorage, and all settings will be reset upon page reload.

Default value

false

Example

Set the autoSaveState property.

 <smart-kanban auto-save-state></smart-kanban>

Set the autoSaveState property by using the HTML Element's instance.

 const kanban = document.querySelector('smart-kanban');
 kanban.autoSaveState = false;

Get the autoSaveState property.

 const kanban = document.querySelector('smart-kanban');
 let autoSaveState = kanban.autoSaveState;

autoColumnHeightboolean

Dynamically adjusts the height of each column based on the total height of its tasks, ensuring all content is fully visible. This property is effective only when 'columnColorEntireSurface' is set to true, allowing the background color to extend appropriately over the column’s entire surface.

Default value

false

Example

Set the autoColumnHeight property.

 <smart-kanban auto-column-height></smart-kanban>

Set the autoColumnHeight property by using the HTML Element's instance.

 const kanban = document.querySelector('smart-kanban');
 kanban.autoColumnHeight = false;

Get the autoColumnHeight property.

 const kanban = document.querySelector('smart-kanban');
 let autoColumnHeight = kanban.autoColumnHeight;

collapsibleboolean

Enables the card content to be expanded or collapsed, providing users with the ability to show or hide additional information within the card. This enhances the user interface by reducing visual clutter and allowing for more compact content presentation.

Default value

false

Example

Set the collapsible property.

 <smart-kanban collapsible></smart-kanban>

Set the collapsible property by using the HTML Element's instance.

 const kanban = document.querySelector('smart-kanban');
 kanban.collapsible = false;

Get the collapsible property.

 const kanban = document.querySelector('smart-kanban');
 let collapsible = kanban.collapsible;

columnColorsboolean

Displays a color indicator in the column header whenever the column's color property is defined. The header visually reflects the assigned color, making it easier to identify and distinguish columns based on their color settings.

Default value

false

Example

Set the columnColors property.

 <smart-kanban column-colors></smart-kanban>

Set the columnColors property by using the HTML Element's instance.

 const kanban = document.querySelector('smart-kanban');
 kanban.columnColors = false;

Get the columnColors property.

 const kanban = document.querySelector('smart-kanban');
 let columnColors = kanban.columnColors;

columnWidthnumber | null

Defines the width for each Kanban column. When this property is specified, all Kanban columns are rendered at the given width. If the total width of all columns exceeds the available space, a horizontal scrollbar will appear, allowing users to scroll and view all columns.

Example

Set the columnWidth property.

 <smart-kanban column-width='null'></smart-kanban>

Set the columnWidth property by using the HTML Element's instance.

 const kanban = document.querySelector('smart-kanban');
 kanban.columnWidth = 300;

Get the columnWidth property.

 const kanban = document.querySelector('smart-kanban');
 let columnWidth = kanban.columnWidth;

columnColorEntireSurfaceboolean

Renders a customizable background within the Kanban column, allowing for enhanced visual separation and improved column identification. Supports various background options such as color, image, or pattern to match your application's design requirements.

Default value

false

Example

Set the columnColorEntireSurface property.

 <smart-kanban column-color-entire-surface></smart-kanban>

Set the columnColorEntireSurface property by using the HTML Element's instance.

 const kanban = document.querySelector('smart-kanban');
 kanban.columnColorEntireSurface = false;

Get the columnColorEntireSurface property.

 const kanban = document.querySelector('smart-kanban');
 let columnColorEntireSurface = kanban.columnColorEntireSurface;

columnFooterboolean

Renders a column footer that displays a summary value, such as totals or averages, for the data in that column. This footer helps users quickly interpret aggregate information at the bottom of the column.

Default value

false

Example

Set the columnFooter property.

 <smart-kanban column-footer></smart-kanban>

Set the columnFooter property by using the HTML Element's instance.

 const kanban = document.querySelector('smart-kanban');
 kanban.columnFooter = false;

Get the columnFooter property.

 const kanban = document.querySelector('smart-kanban');
 let columnFooter = kanban.columnFooter;

columns{ addNewButton?: boolean, collapsed?: boolean, collapsible?: boolean, columns?: [], dataField?: string, label?: string, orientation?: string, selected?: boolean }[]

Provides detailed definitions and configuration options for each column’s properties, including attributes such as data type, default value, visibility, header label, and formatting options.

Properties

addNewButtonboolean

Sets or gets whether the column's button for adding tasks is visible. Works in conjunction with the Kanban property of the same name.

Default value

true

Get the addNewButton property.

 const kanban = document.querySelector('smart-kanban');
 let addNewButton = kanban.columns[0].addNewButton;

allowRemoveboolean

Sets or gets whether the column can be removed from the column menu.

Default value

true

Get the allowRemove property.

 const kanban = document.querySelector('smart-kanban');
 let allowRemove = kanban.columns[0].allowRemove;

collapsedboolean

Sets or gets whether the column is collapsed.

Default value

false

Get the collapsed property.

 const kanban = document.querySelector('smart-kanban');
 let collapsed = kanban.columns[0].collapsed;

collapsibleboolean

Sets or gets whether the column is collapsible. Works in conjunction with the Kanban property of the same name.

Default value

true

Get the collapsible property.

 const kanban = document.querySelector('smart-kanban');
 let collapsible = kanban.columns[0].collapsible;

columns{ addNewButton?: boolean, collapsed?: string, collapsible?: string, columns?: [], dataField?: string, label?: string, orientation?: string, selected?: string }[]

Sets or gets the column's sub-columns. Sub-columns has the same properties as top-level columns.

Get the columns property.

 const kanban = document.querySelector('smart-kanban');
 let columns = kanban.columns[0].columns;

dataFieldstring

Sets or gets the column's data source bound field. Corresponds to the status field in the data source.

Default value

""

Get the dataField property.

 const kanban = document.querySelector('smart-kanban');
 let dataField = kanban.columns[0].dataField;

labelstring

Sets or gets the text displayed in the column's header.

Default value

""

Get the label property.

 const kanban = document.querySelector('smart-kanban');
 let label = kanban.columns[0].label;

editableboolean

Sets or gets whether a column is editable.

Default value

true

Get the editable property.

 const kanban = document.querySelector('smart-kanban');
 let editable = kanban.columns[0].editable;

visibleboolean

Sets or gets whether a column is visible.

Default value

true

Get the visible property.

 const kanban = document.querySelector('smart-kanban');
 let visible = kanban.columns[0].visible;

reorderboolean

Sets or gets whether a column can be reordered.

Default value

true

Get the reorder property.

 const kanban = document.querySelector('smart-kanban');
 let reorder = kanban.columns[0].reorder;

orientation"vertical" | "horizontal"

Sets or gets whether the tasks in the column flow vertically or horizontally.

Default value

"vertical"

Get the orientation property.

 const kanban = document.querySelector('smart-kanban');
 let orientation = kanban.columns[0].orientation;

selectedboolean

Sets or gets whether the column is selected. Only applicable to sub-columns when hierarchy is 'tabs'.

Default value

false

Get the selected property.

 const kanban = document.querySelector('smart-kanban');
 let selected = kanban.columns[0].selected;

headerTemplateany

Determines whether a column header has a template. You can pass 'string', 'function' or HTMLTemplateElement as a value.

Get the headerTemplate property.

 const kanban = document.querySelector('smart-kanban');
 let headerTemplate = kanban.columns[0].headerTemplate;

widthnumber | null

Sets the Kanban column width. When this property is set, the kanban column width is set and a horizontal scrollbar may appear.

Example

Set the width property by using the HTML Element's instance.

 const kanban = document.querySelector('smart-kanban');
 kanban.columns[0].width = 300;

Get the width property.

 const kanban = document.querySelector('smart-kanban');
 let width = kanban.columns[0].width;

Example

Set the columns property.

 <smart-kanban columns='{ label: 'In progress', dataField: 'inProgress' }, { label: 'Testing', dataField: 'testing' }, { label: 'Done', dataField: 'done' }'></smart-kanban>

Set the columns property by using the HTML Element's instance.

 const kanban = document.querySelector('smart-kanban');
 kanban.columns = { label: 'In progress', dataField: 'inProgress' }, { label: 'Testing', dataField: 'testing', orientation: 'horizontal', columns: [{ label: 'Manual testing', dataField: 'manualTesting', selected: true, columns: [{ label: 'Desktop devices', dataField: 'desktop' }, { label: 'Mobile devices', dataField: 'mobile', selected: true }] }, { label: 'Unit testing', dataField: 'unitTesting' }] };

Get the columns property.

 const kanban = document.querySelector('smart-kanban');
 let columns = kanban.columns;

columnActionsboolean

Controls whether the column actions icon is displayed, allowing users to access additional options or actions for each table column. When enabled, the icon becomes visible; when disabled, the icon is hidden from view.

Default value

false

Example

Set the columnActions property.

 <smart-kanban column-actions></smart-kanban>

Set the columnActions property by using the HTML Element's instance.

 const kanban = document.querySelector('smart-kanban');
 kanban.columnActions = false;

Get the columnActions property.

 const kanban = document.querySelector('smart-kanban');
 let columnActions = kanban.columnActions;

columnSummaryboolean

Specifies whether the number of tasks is shown in the headers of each column, allowing users to see the count of tasks directly within the column titles.

Default value

false

Example

Set the columnSummary property.

 <smart-kanban column-summary></smart-kanban>

Set the columnSummary property by using the HTML Element's instance.

 const kanban = document.querySelector('smart-kanban');
 kanban.columnSummary = false;

Get the columnSummary property.

 const kanban = document.querySelector('smart-kanban');
 let columnSummary = kanban.columnSummary;

columnHeaderTemplateany

Specifies whether a custom template is applied to the column header. Accepts a value of type string (containing template markup), function (returning a template or markup), or an HTMLTemplateElement. Use this property to customize the appearance and content of the column header beyond the default rendering.

Example

Set the columnHeaderTemplate property.

 <smart-kanban column-header-template='#headerTemplate'></smart-kanban>

Set the columnHeaderTemplate property by using the HTML Element's instance.

 const kanban = document.querySelector('smart-kanban');
 kanban.columnHeaderTemplate = #headerCustomTemplate;

Get the columnHeaderTemplate property.

 const kanban = document.querySelector('smart-kanban');
 let columnHeaderTemplate = kanban.columnHeaderTemplate;

columnEditMode"header" | "menu" | "headerAndMenu"

Specifies how column editing is initiated within the interface.
- When set to ''header'', editing mode is activated by double-clicking directly on the column's header label.
- When set to ''menu'', editing can only be started through the column's context or 'columnActions' menu.
- When set to ''headerAndMenu'', both methods are available—users can begin editing either by double-clicking the header or by selecting the relevant option from the column menu.

Default value

"headerAndMenu"

Example

Set the columnEditMode property.

 <smart-kanban column-edit-mode='true'></smart-kanban>

Set the columnEditMode property by using the HTML Element's instance.

 const kanban = document.querySelector('smart-kanban');
 kanban.columnEditMode = 'false';

Get the columnEditMode property.

 const kanban = document.querySelector('smart-kanban');
 let columnEditMode = kanban.columnEditMode;

currentUserstring | number

Sets or retrieves the ID of the currently active user. This value must match the 'id' of a user object within the 'users' property or array. The privileges and access rights available are determined based on the current user's identity. If no current user is specified, the element's permissions default to those defined by its own properties, rather than user-specific settings.

Default value

""

Example

Set the currentUser property.

 <smart-kanban current-user='1'></smart-kanban>

Set the currentUser property by using the HTML Element's instance.

 const kanban = document.querySelector('smart-kanban');
 kanban.currentUser = 2;

Get the currentUser property.

 const kanban = document.querySelector('smart-kanban');
 let currentUser = kanban.currentUser;

disableDialogboolean

Controls whether the default dialog for adding or removing tasks or comments is enabled or disabled. When set to true, the dialog will not appear, allowing for custom handling of these actions. When set to false, the standard dialog will be shown as usual. This property can be used to either retrieve the current setting (get) or define its behavior (set).

Default value

false

Example

Set the disableDialog property.

 <smart-kanban disable-dialog></smart-kanban>

Set the disableDialog property by using the HTML Element's instance.

 const kanban = document.querySelector('smart-kanban');
 kanban.disableDialog = false;

Get the disableDialog property.

 const kanban = document.querySelector('smart-kanban');
 let disableDialog = kanban.disableDialog;

dialogCustomizationFunctionany

Sets or retrieves a customization function for the Kanban dialog component. This function allows you to modify the appearance and behavior of the dialog, or to replace it entirely with a custom implementation. When invoked, the Kanban component calls this function with five arguments:

- 'dialog': The default dialog instance, typically a 'smart-window' object, which serves as the default modal dialog for tasks and comments.
- 'taskOrComment': The data object representing either a Kanban task or a comment, depending on the context of the action.
- 'editors': An object containing the input elements or editors used within the dialog for data entry or modification.
- 'purpose': A string indicating the dialog’s intent, such as ''add'' for creating a new item or ''edit'' for modifying an existing one.
- 'type': A string specifying the entity being processed, such as ''task'' for task-related dialogs or ''column'' for column-related dialogs.

By providing a custom function, you can tailor the dialog’s UI, integrate additional logic, or substitute a completely different dialog component to meet your application's requirements.

dialogRenderedany

Sets or retrieves the callback function that is executed when the dialog is rendered. This function is invoked by the Kanban component and receives six arguments: dialog, editors, labels, tabs, layout, and taskOrComment.

- 'dialog': The 'smart-window' instance representing the Kanban dialog.
- 'taskOrComment': An object representing either the current Kanban task or a comment, depending on the context in which the dialog is opened.
- 'editors, labels, tabs, layout': Each is a JSON object where keys specify the element type (e.g., 'description', 'priority', 'notes'), and the values are their corresponding HTML elements within the dialog.

This function allows developers to customize the dialog content or behavior dynamically based on the element types and the associated data when the dialog is rendered.

dataSource{ id: string | number, checklist?: { completed?: boolean, text?: string }[], color?: string, comments?: { text?: string, time?: Date, userId: string | number }[], dueDate?: Date, priority?: string, progress?: number, startDate?: Date, status?: string, swimlane?: string, tags?: string, text?: string, userId?: string | number }[]

Specifies the origin or source of the data to be displayed and managed on the Kanban board, such as an API endpoint, database, or local data array. This setting dictates which dataset will populate the Kanban columns and cards.

Properties

idstring | number

The task's unique ID.

Default value

""

Get the id property.

 const kanban = document.querySelector('smart-kanban');
 let id = kanban.dataSource.id;

checklist{ completed?: boolean, text?: string }[]

A list of sub-tasks.

Get the checklist property.

 const kanban = document.querySelector('smart-kanban');
 let checklist = kanban.dataSource.checklist;

colorstring

A color used to highlight the task's card visually.

Default value

"null"

Get the color property.

 const kanban = document.querySelector('smart-kanban');
 let color = kanban.dataSource.color;

comments{ text?: string, time?: Date, userId: string | number }[]

Comments about a task.

Get the comments property.

 const kanban = document.querySelector('smart-kanban');
 let comments = kanban.dataSource.comments;

dueDateDate

The task's due date.

Get the dueDate property.

 const kanban = document.querySelector('smart-kanban');
 let dueDate = kanban.dataSource.dueDate;

prioritystring

The task's priority.

Default value

"normal"

Get the priority property.

 const kanban = document.querySelector('smart-kanban');
 let priority = kanban.dataSource.priority;

progressnumber

The task's progress in percentages - a number from 0 to 100.

Get the progress property.

 const kanban = document.querySelector('smart-kanban');
 let progress = kanban.dataSource.progress;

startDateDate

The task's start date.

Get the startDate property.

 const kanban = document.querySelector('smart-kanban');
 let startDate = kanban.dataSource.startDate;

statusstring

The task's status. Has to correspond to the dataField of a column or sub-column from the columns property/array.

Default value

""

Get the status property.

 const kanban = document.querySelector('smart-kanban');
 let status = kanban.dataSource.status;

swimlanestring

The swimlane of the task. Has to correspond to the dataField of a swimlane from the swimlanes property/array, if it is defined.

Default value

"null"

Get the swimlane property.

 const kanban = document.querySelector('smart-kanban');
 let swimlane = kanban.dataSource.swimlane;

tagsstring

A comma-separated list of tags.

Default value

""

Get the tags property.

 const kanban = document.querySelector('smart-kanban');
 let tags = kanban.dataSource.tags;

textstring

The text of the task.

Default value

""

Get the text property.

 const kanban = document.querySelector('smart-kanban');
 let text = kanban.dataSource.text;

userIdstring | number

The ID of the user assigned to the task. Has to correspond to the id of an item from the users property/array.

Get the userId property.

 const kanban = document.querySelector('smart-kanban');
 let userId = kanban.dataSource.userId;

Example

Set the dataSource property.

 <smart-kanban data-source='["item 1", "item 2"]'></smart-kanban>

Set the dataSource property by using the HTML Element's instance.

 const kanban = document.querySelector('smart-kanban');
 kanban.dataSource = ["new item 1", "new item 2"];

Get the dataSource property.

 const kanban = document.querySelector('smart-kanban');
 let dataSource = kanban.dataSource;

dataSourceMap{ checklist?: string; color?: string; comments?: string; dueDate?: string; id?: string; priority?: string; progress?: string; startDate?: string; status?: string; swimlane?: string; tags?: string; text?: string; userId?: string; createdUserId?: string; updatedUserId?: string; createdDate?: Date; updatedDate?: Date;}

Specifies how the Kanban board's default fields (e.g., title, status, assignee) correspond to the fields in your data source. Use this mapping only if your data source uses field names that differ from the Kanban's expected keywords. If the field names already match, this mapping is optional. Note that only certain default fields support custom mapping; not all default mappings can be overridden.

Default value

{ checklist: 'checklist', color: 'color', comments: 'comments', dueDate: 'dueDate', id: 'id', priority: 'priority', progress: 'progress', startDate: 'startDate', status: 'status', swimlane: 'swimlane', tags: 'tags', text: 'text', userId: 'userId'. createdUserId: 'createdUserId', createdDate: 'createdDate', updatedUserId: 'updatedUserId', updatedDate: 'updatedDate' }

Example

Set the dataSourceMap property.

 <smart-kanban data-source-map='{ checklist: 'toDoList', comments: 'feedback', status: 'dataField' }'></smart-kanban>

Set the dataSourceMap property by using the HTML Element's instance.

 const kanban = document.querySelector('smart-kanban');
 kanban.dataSourceMap = { id: 'ID', startDate: 'start', status: 'status', swimlane: 'category' };

Get the dataSourceMap property.

 const kanban = document.querySelector('smart-kanban');
 let dataSourceMap = kanban.dataSourceMap;

dragOffsetboolean

Specifies the offset, in pixels, between the drag feedback element and the mouse cursor during task dragging operations. The value should be provided as an array: the first element sets the horizontal (x-axis) offset, and the second element sets the vertical (y-axis) offset, both relative to the cursor position. Alternatively, if set to 'auto', the system automatically calculates the offset based on the cursor’s position at the moment the drag action began. This allows for precise control over the visual positioning of the feedback element during drag-and-drop interactions.

Default value

auto

Example

Set the dragOffset property.

 <smart-kanban drag-offset></smart-kanban>

Set the dragOffset property by using the HTML Element's instance.

 const kanban = document.querySelector('smart-kanban');
 kanban.dragOffset = auto;

Get the dragOffset property.

 const kanban = document.querySelector('smart-kanban');
 let dragOffset = kanban.dragOffset;

editableboolean

Controls whether tasks can be modified, including editing task details and assigning users to tasks. When enabled, users can update task information and manage task assignments; when disabled, tasks and their assigned users are read-only and cannot be changed programmatically or through the user interface.

Default value

false

Example

Set the editable property.

 <smart-kanban editable></smart-kanban>

Set the editable property by using the HTML Element's instance.

 const kanban = document.querySelector('smart-kanban');
 kanban.editable = false;

Get the editable property.

 const kanban = document.querySelector('smart-kanban');
 let editable = kanban.editable;

editMode"doubleClick" | "singleClick"

Specifies how users can activate the task editing feature. The 'editBehavior' property accepts either '"singleClick"' or '"doubleClick"' as values:

- '"singleClick"': Opens the dialog edit window when the user clicks once on a Kanban task.
- '"doubleClick"' (default): Opens the dialog edit window when the user double-clicks on a Kanban task.

By default, editing is triggered by a double-click. Use this setting to customize the interaction based on your application's needs.

Default value

"doubleClick"

Example

Set the editMode property.

 <smart-kanban edit-mode='doubleClick'></smart-kanban>

Set the editMode property by using the HTML Element's instance.

 const kanban = document.querySelector('smart-kanban');
 kanban.editMode = 'singleClick';

Get the editMode property.

 const kanban = document.querySelector('smart-kanban');
 let editMode = kanban.editMode;

formatStringDatestring

Sets or retrieves the format string used to display the "Due date" label, as well as the date format for both the "Start date" and "Due date" editor fields. This determines how dates are shown and entered in these UI components.

Default value

"d"

Example

Set the formatStringDate property.

 <smart-kanban format-string-date='dddd-MMMM-yyyy'></smart-kanban>

Set the formatStringDate property by using the HTML Element's instance.

 const kanban = document.querySelector('smart-kanban');
 kanban.formatStringDate = 'M/d/yyyy';

Get the formatStringDate property.

 const kanban = document.querySelector('smart-kanban');
 let formatStringDate = kanban.formatStringDate;

formatStringTimestring

Specifies or retrieves the format string used to display the timestamp on comments. This determines how the date and time of each comment are presented (e.g., "YYYY-MM-DD HH:mm:ss").

Default value

"MMM d, HH:mm"

Example

Set the formatStringTime property.

 <smart-kanban format-string-time='HH:mm'></smart-kanban>

Set the formatStringTime property by using the HTML Element's instance.

 const kanban = document.querySelector('smart-kanban');
 kanban.formatStringTime = 'MMM d, h:mm tt';

Get the formatStringTime property.

 const kanban = document.querySelector('smart-kanban');
 let formatStringTime = kanban.formatStringTime;

headerPosition"none" | "top" | "bottom"

Sets or retrieves the position of the header section within the user interface. The header typically contains interactive controls such as Customize, Filter, Sort, and Search buttons, allowing users to adjust and manipulate the displayed data according to their preferences.

Default value

"none"

Example

Set the headerPosition property.

 <smart-kanban header-position='top'></smart-kanban>

Set the headerPosition property by using the HTML Element's instance.

 const kanban = document.querySelector('smart-kanban');
 kanban.headerPosition = 'bottom';

Get the headerPosition property.

 const kanban = document.querySelector('smart-kanban');
 let headerPosition = kanban.headerPosition;

hierarchy"columns" | "tabs"

Defines or retrieves how the column hierarchy is structured and displayed, specifying the method or format used to represent the relationships between columns within the component or dataset.

Allowed Values

  • "columns" - Sub-columns are represented as nested columns.
  • "tabs" - Sub-columns are represented as nested tabs. In this case, each sub-column has the property selected that denotes if its contents is visible.

Default value

"columns"

Example

Set the hierarchy property.

 <smart-kanban hierarchy='tabs'></smart-kanban>

Set the hierarchy property by using the HTML Element's instance.

 const kanban = document.querySelector('smart-kanban');
 kanban.hierarchy = 'columns';

Get the hierarchy property.

 const kanban = document.querySelector('smart-kanban');
 let hierarchy = kanban.hierarchy;

unlockKeystring

Gets or sets the unlockKey property, a unique key used to unlock or activate the product. This key is required to enable full access to product features.

Default value

""

Example

Set the unlockKey property.

 <smart-kanban unlock-key=''></smart-kanban>

Set the unlockKey property by using the HTML Element's instance.

 const kanban = document.querySelector('smart-kanban');
 kanban.unlockKey = '1111-2222-3333-4444-5555';

Get the unlockKey property.

 const kanban = document.querySelector('smart-kanban');
 let unlockKey = kanban.unlockKey;

localestring

Sets or retrieves the current locale (language and regional settings) used by the component. This property determines the language in which messages are displayed, and works together with the messages property, which provides localized message strings for each supported locale. Adjusting the locale will change the displayed text to correspond with the selected language from the messages definitions.

Default value

"en"

Example

Set the locale property.

 <smart-kanban locale='de'></smart-kanban>

Set the locale property by using the HTML Element's instance.

 const kanban = document.querySelector('smart-kanban');
 kanban.locale = 'fr';

Get the locale property.

 const kanban = document.querySelector('smart-kanban');
 let locale = kanban.locale;

messagesobject

Defines or retrieves an object containing the strings displayed in the widget, allowing for easy localization of text. This property works together with the locale property to support multiple languages and adapt the user interface based on the selected locale. Use this to provide translated labels, messages, and other widget text for internationalization.

Default value




Example

Set the messages property.

 <smart-kanban messages='{ 'he': { 'addFilter': 'הוסף פילטר', 'and': 'ו', 'apply': 'להגיש מועמדות', 'booleanFirst': '☐', 'booleanLast': '☑', 'cancel': 'בטל', 'CONTAINS': 'מכיל', 'CONTAINS_CASE_SENSITIVE': 'מכיל (רגיש רישיות)', 'dateFirst': '1', 'dateLast': '9', 'DOES_NOT_CONTAIN': 'לא מכיל', 'DOES_NOT_CONTAIN_CASE_SENSITIVE': 'אינו מכיל (רגיש רישיות)', 'EMPTY': 'ריק', 'ENDS_WITH': 'נגמר עם', 'ENDS_WITH_CASE_SENSITIVE': 'מסתיים ב (רגיש רישיות)', 'EQUAL': 'שווה', 'EQUAL_CASE_SENSITIVE': 'שווה (רגיש אותיות רישיות)', 'filter': 'סנן', 'filteredByMultiple': '{{n}} פילטרים', 'filteredByOne': '1 פילטר', 'filterValuePlaceholder': 'ערך', 'find': 'מצא שדה', 'findInView': 'מצא בתצוגה', 'firstBy': 'מיין לפי', 'found': '{{nth}} מתוך {{n}}', 'from': 'מ', 'GREATER_THAN': 'גדול מ', 'GREATER_THAN_OR_EQUAL': 'גדול או שווה', 'LESS_THAN': 'פחות מ', 'LESS_THAN_OR_EQUAL': 'פחות מ או שווה', 'noFilters': 'לא הוחל מסננים', 'noResults': 'אין תוצאות', 'noSorting': 'לא מיושם מיון', 'NOT_EMPTY': 'לא ריק', 'NOT_EQUAL': 'לא שווה', 'NOT_NULL': 'לא ריק', 'NULL': 'ריק', 'numberFirst': '1', 'numberLast': '9', 'ok': 'בסדר', 'or': 'או', 'pickAnother': 'בחר שדה אחר למיין לפי', 'sort': 'סוג', 'sortedByMultiple': 'ממוין לפי שדות {{n}}', 'sortedByOne': 'מסודר לפי שדה 1', 'STARTS_WITH': 'starts with', 'STARTS_WITH_CASE_SENSITIVE': 'מתחיל עם', 'stringFirst': 'א', 'stringLast': 'ז', 'thenBy': 'ואז על ידי', 'where': 'איפה', 'actionsIcon': 'סמל פעולות', 'addNewStatus': 'סטטוס חדש', 'addNewTask': 'הוסף משימה חדשה', 'addSubtask': 'הוסף משימת משנה', 'assignedTo': 'שהוקצה ל', 'checklist': 'רשימת מטלות', 'color': 'צבע', 'commentsIcon': 'סמל הערות', 'copy': 'עותק', 'customize': 'התאם אישית משימות', 'dueDate': 'תאריך להגשה', 'edit': 'ערוך', 'editTask': 'ערוך את המשימה "{{taskId}}"', 'high': 'גבוה', 'low': 'נמוך', 'newComment': 'תגובה חדשה', 'newSubtask': 'תת-משימה חדשה', 'normal': 'רגיל', 'priority': 'עדיפות', 'priorityIcon': 'סמל עדיפות', 'progress': 'התקדמות', 'promptComment': 'האם אתה בטוח שברצונך להסיר תגובה זו?', 'promptTask': 'האם אתה בטוח שברצונך להסיר את המשימה "{{taskText}}"?', 'remove': 'הסר', 'removeSubtask': 'הסר את תת המשנה', 'send': 'שלח', 'startDate': 'תאריך התחלה', 'status': 'סטטוס', 'swimlane': 'נתיב שחייה', 'tags': 'תגיות', 'text': 'טקסט', 'userId': 'תעודת זהות של המשתמש', 'userIcon': 'סמל משתמש' } }'></smart-kanban>

Set the messages property by using the HTML Element's instance.

 const kanban = document.querySelector('smart-kanban');
 kanban.messages = { 'en': { 'addFilter': '+ Add filter', 'and': 'And', 'apply': 'Apply', 'booleanFirst': '☐', 'booleanLast': '☑', 'cancel': 'Cancel', 'CONTAINS': 'contains', 'CONTAINS_CASE_SENSITIVE': 'contains (case sensitive)', 'dateFirst': '1', 'dateLast': '9', 'DOES_NOT_CONTAIN': 'does not contain', 'DOES_NOT_CONTAIN_CASE_SENSITIVE': 'does not contain (case sensitive)', 'EMPTY': 'empty', 'ENDS_WITH': 'ends with', 'ENDS_WITH_CASE_SENSITIVE': 'ends with (case sensitive)', 'EQUAL': 'equal', 'EQUAL_CASE_SENSITIVE': 'equal (case sensitive)', 'filter': 'Filter', 'filteredByMultiple': '{{n}} filters', 'filteredByOne': '1 filter', 'filterValuePlaceholder': 'Value', 'find': 'Find a field', 'findInView': 'Find in view', 'firstBy': 'Sort by', 'found': '{{nth}} of {{n}}', 'from': 'from', 'GREATER_THAN': 'greater than', 'GREATER_THAN_OR_EQUAL': 'greater than or equal', 'LESS_THAN': 'less than', 'LESS_THAN_OR_EQUAL': 'less than or equal', 'noFilters': 'No filters applied', 'noResults': 'No results', 'noSorting': 'No sorting applied', 'NOT_EMPTY': 'not empty', 'NOT_EQUAL': 'not equal', 'NOT_NULL': 'not null', 'NULL': 'null', 'numberFirst': '1', 'numberLast': '9', 'ok': 'OK', 'or': 'Or', 'pickAnother': 'Pick another field to sort by', 'sort': 'Sort', 'sortedByMultiple': 'Sorted by {{n}} fields', 'sortedByOne': 'Sorted by 1 field', 'STARTS_WITH': 'starts with', 'STARTS_WITH_CASE_SENSITIVE': 'starts with (case sensitive)', 'stringFirst': 'A', 'stringLast': 'Z', 'thenBy': 'then by', 'where': 'Where', 'actionsIcon': 'Actions icon', 'addNewStatus': 'New status', 'addNewTask': 'Add new task', 'addSubtask': 'Add subtask', 'assignedTo': 'Assigned to', 'checklist': 'Checklist', 'color': 'Color', 'commentsIcon': 'Comments icon', 'copy': 'Copy', 'customize': 'Customize tasks', 'dueDate': 'Due date', 'edit': 'Edit', 'editTask': 'Edit task "{{taskId}}"', 'high': 'High', 'low': 'Low', 'newComment': 'New comment', 'newSubtask': 'New subtask', 'normal': 'Normal', 'priority': 'Priority', 'priorityIcon': 'Priority icon', 'progress': 'Progress', 'promptComment': 'Are you sure you want to remove this comment?', 'promptTask': 'Are you sure you want to remove the task "{{taskText}}"?', 'remove': 'Remove', 'removeSubtask': 'Remove subtask', 'send': 'Send', 'startDate': 'Start date', 'status': 'Status', 'swimlane': 'Swimlane', 'tags': 'Tags', 'text': 'Text', 'userId': 'User ID', 'userIcon': 'User icon' } };

Get the messages property.

 const kanban = document.querySelector('smart-kanban');
 let messages = kanban.messages;

onTaskRenderany

Callback function that allows you to customize how tasks are rendered within the Kanban board. This function is invoked by the Kanban component and receives two arguments:

1. The HTML element representing the task (taskHtmlElement).
2. The data object associated with the task (taskData).

You can use this callback to modify the appearance, add event listeners, or inject additional content into the task's HTML element based on its data.

onFilterPrepareany

Callback function that enables customization of the filter items displayed in the dropdown. It receives a single argument: an array containing all the items available for filtering. Within the function, you can modify this array—such as by updating, removing, or reordering items—to control which options appear in the filter dropdown and how they are presented to the user. The modified array will determine the final set of filter options shown in the UI.

onSortPrepareany

A callback function that allows you to customize the items displayed in the sort dropdown menu. This function receives a single argument: an array containing all available sort options. You can modify this array—by removing, reordering, or updating items—to control which sorting options appear in the dropdown and how they are presented. The modified array will then be used to render the sort options to the user.

onColumnHeaderRenderany

Callback function that allows customization of the column header rendering in the Kanban component. This function is invoked with three arguments: the column header's HTML element, the complete column data object, and the column's data field (a string representing the key associated with the column). Use this callback to modify or enhance the appearance and behavior of column headers as needed.

onColumnFooterRenderany

Callback function that allows you to customize how the column footer is rendered in the Kanban component. This function is invoked with three arguments:

1. The HTML element representing the column header
2. The data object for the current column
3. The field name associated with the column data

Use this callback to modify the footer's appearance or content based on the specific column's properties and data.

selectionMode"zeroOrOne" | "zeroOrManyExtended"

Specifies how items can be selected within the component, such as allowing single selection, multiple selections, or disabling selection entirely.

Allowed Values

  • "zeroOrOne" - Only one task can optionally be selected.
  • "zeroOrManyExtended" - One or more items can optionally be selected; selection with Ctrl and Shift is allowed.

Default value

"zeroOrOne"

Example

Set the selectionMode property.

 <smart-kanban selection-mode='zeroOrManyExtended'></smart-kanban>

Set the selectionMode property by using the HTML Element's instance.

 const kanban = document.querySelector('smart-kanban');
 kanban.selectionMode = 'zeroOrOne';

Get the selectionMode property.

 const kanban = document.querySelector('smart-kanban');
 let selectionMode = kanban.selectionMode;

storeHistoryboolean

Specifies whether the history of tasks is recorded and shown within the task dialog. When enabled, completed or previous tasks will be saved and displayed, allowing users to review their task activity directly in the dialog. When disabled, task history will not be retained or visible. This setting can be used to set or retrieve the current history display behavior.

Default value

false

Example

Set the storeHistory property.

 <smart-kanban store-history></smart-kanban>

Set the storeHistory property by using the HTML Element's instance.

 const kanban = document.querySelector('smart-kanban');
 kanban.storeHistory = true;

Get the storeHistory property.

 const kanban = document.querySelector('smart-kanban');
 let storeHistory = kanban.storeHistory;

storeHistoryItemsnumber

Specifies the collection of task history items to be retrieved or updated when the storeHistory option is enabled. When storeHistory is true, this property determines which task history records are saved and accessed.

Default value

20

Example

Set the storeHistoryItems property.

 <smart-kanban store-history-items='10'></smart-kanban>

Set the storeHistoryItems property by using the HTML Element's instance.

 const kanban = document.querySelector('smart-kanban');
 kanban.storeHistoryItems = 30;

Get the storeHistoryItems property.

 const kanban = document.querySelector('smart-kanban');
 let storeHistoryItems = kanban.storeHistoryItems;

rightToLeftboolean

Sets or retrieves a value that determines whether the element’s alignment is configured for right-to-left (RTL) text direction, which is typically used in languages such as Arabic or Hebrew. When enabled, the element layout and text flow will support RTL locales, ensuring proper display for right-to-left scripts.

Default value

false

Example

Set the rightToLeft property.

 <smart-kanban right-to-left></smart-kanban>

Set the rightToLeft property by using the HTML Element's instance.

 const kanban = document.querySelector('smart-kanban');
 kanban.rightToLeft = true;

Get the rightToLeft property.

 const kanban = document.querySelector('smart-kanban');
 let rightToLeft = kanban.rightToLeft;

readonlyboolean

Controls the read-only state of the edit dialog. When enabled, the dialog displays task details but disables all editing capabilities for those fields. However, if the comments feature is active, users can still add comments within the dialog, even while other fields remain uneditable.

Default value

false

Example

Set the readonly property.

 <smart-kanban readonly></smart-kanban>

Set the readonly property by using the HTML Element's instance.

 const kanban = document.querySelector('smart-kanban');
 kanban.readonly = true;

Get the readonly property.

 const kanban = document.querySelector('smart-kanban');
 let readonly = kanban.readonly;

swimlanesstring | { color?: string, dataField?: string, label?: string }[]

Provides a detailed configuration of swimlanes on the Kanban board, specifying how tasks are grouped horizontally by categories such as assignee, priority, or project. When swimlanes are enabled, sub-columns within each column are disabled to maintain a clear visual separation of items across swimlanes.

Properties

colorstring

The swimlane's color.

Default value

"null"

Get the color property.

 const kanban = document.querySelector('smart-kanban');
 let color = kanban.swimlanes[0].color;

dataFieldstring

Sets or gets the swimlane's data source bound field. Corresponds to the swimlane field in the data source.

Default value

""

Get the dataField property.

 const kanban = document.querySelector('smart-kanban');
 let dataField = kanban.swimlanes[0].dataField;

labelstring

Sets or gets the text displayed in the swimlane.

Default value

""

Get the label property.

 const kanban = document.querySelector('smart-kanban');
 let label = kanban.swimlanes[0].label;

Example

Set the swimlanes property.

 <smart-kanban swimlanes='{ label: 'Client Energo', dataField: 'client1' }, { label: 'Client Sim-Prod Ltd.', dataField: 'client2', color: '#C90086' }'></smart-kanban>

Set the swimlanes property by using the HTML Element's instance.

 const kanban = document.querySelector('smart-kanban');
 kanban.swimlanes = { label: 'Client Sim-Prod Ltd.', dataField: 'client2', color: '#C90086' }, { label: 'Other clients', dataField: 'other', color: '#03C7C0' };

Get the swimlanes property.

 const kanban = document.querySelector('smart-kanban');
 let swimlanes = kanban.swimlanes;

swimlanesFromnumber

Specifies or retrieves the zero-based index of the column where the swimlanes should begin. This determines the starting position for rendering swimlanes within a grid or table layout.

Default value

0

Example

Set the swimlanesFrom property.

 <smart-kanban swimlanes-from='1'></smart-kanban>

Set the swimlanesFrom property by using the HTML Element's instance.

 const kanban = document.querySelector('smart-kanban');
 kanban.swimlanesFrom = 3;

Get the swimlanesFrom property.

 const kanban = document.querySelector('smart-kanban');
 let swimlanesFrom = kanban.swimlanesFrom;

swimlanesTonumber

Specifies or retrieves the zero-based index of the column where the swimlanes should terminate. By default, swimlanes extend to the final column in the layout. Setting this property allows you to control at which column the swimlanes will stop, providing flexibility in customizing the swimlane display.

Example

Set the swimlanesTo property.

 <smart-kanban swimlanes-to='4'></smart-kanban>

Set the swimlanesTo property by using the HTML Element's instance.

 const kanban = document.querySelector('smart-kanban');
 kanban.swimlanesTo = 3;

Get the swimlanesTo property.

 const kanban = document.querySelector('smart-kanban');
 let swimlanesTo = kanban.swimlanesTo;

tags[]

Specifies the permitted tags that can be used. When this property is set, only the listed tags will be allowed; if no tags are specified, all tags provided by the data source are accepted by default. This property can be used to restrict or expand the selection of allowed tags as needed.

Example

Set the tags property.

 <smart-kanban tags='['method', 'data']'></smart-kanban>

Set the tags property by using the HTML Element's instance.

 const kanban = document.querySelector('smart-kanban');
 kanban.tags = ['research', 'property', 'localization'];

Get the tags property.

 const kanban = document.querySelector('smart-kanban');
 let tags = kanban.tags;

taskActionsboolean

Controls whether the task actions icon is displayed or hidden, allowing users to show or conceal the icon based on their preferences or application state.

Default value

false

Example

Set the taskActions property.

 <smart-kanban task-actions></smart-kanban>

Set the taskActions property by using the HTML Element's instance.

 const kanban = document.querySelector('smart-kanban');
 kanban.taskActions = false;

Get the taskActions property.

 const kanban = document.querySelector('smart-kanban');
 let taskActions = kanban.taskActions;

taskActionsRenderedany



Defines a callback function that is invoked whenever the task actions menu is generated in the UI. This function receives the actions menu element as its parameter, enabling you to modify or extend the menu's content and behavior. For example, you can insert custom menu items, attach event listeners, or alter existing elements within the menu.

'Example usage:'
'''js
(list) => {
// Add a custom menu item
list.innerHTML = '

Custom Item
';
// Attach a click handler to the menu
list.onclick = () => {
alert('Custom item clicked');
};
}
'''

This callback provides full access to the task actions menu element, empowering you to tailor the menu to fit your specific requirements.

taskCommentsboolean

Controls whether the task comments icon is displayed or hidden, allowing you to show or conceal the icon associated with task comments.

Default value

false

Example

Set the taskComments property.

 <smart-kanban task-comments></smart-kanban>

Set the taskComments property by using the HTML Element's instance.

 const kanban = document.querySelector('smart-kanban');
 kanban.taskComments = false;

Get the taskComments property.

 const kanban = document.querySelector('smart-kanban');
 let taskComments = kanban.taskComments;

taskDueboolean

Controls whether the task due date icon is shown or hidden in the interface. When enabled, the icon indicating a task's due date will be visible; when disabled, the icon will be hidden from view.

Default value

false

Example

Set the taskDue property.

 <smart-kanban task-due></smart-kanban>

Set the taskDue property by using the HTML Element's instance.

 const kanban = document.querySelector('smart-kanban');
 kanban.taskDue = false;

Get the taskDue property.

 const kanban = document.querySelector('smart-kanban');
 let taskDue = kanban.taskDue;

taskPosition"all" | "leaf"

Determines whether tasks are displayed across all levels of the column hierarchy or are restricted to only the leaf (lowest-level) columns. When enabled, tasks can be shown in any column within the hierarchy; when disabled, tasks are displayed exclusively in the leaf columns. This setting allows you to control the visibility of tasks based on the column hierarchy structure.

Allowed Values

  • "all" - Tasks can be shown in all levels of column hierarchy.
  • "leaf" - Tasks can be shown only on leaf columns.

Default value

"false"

Example

Set the taskPosition property.

 <smart-kanban task-position='leaf'></smart-kanban>

Set the taskPosition property by using the HTML Element's instance.

 const kanban = document.querySelector('smart-kanban');
 kanban.taskPosition = 'all';

Get the taskPosition property.

 const kanban = document.querySelector('smart-kanban');
 let taskPosition = kanban.taskPosition;

taskPriorityboolean

Controls whether the task priority icon is displayed. The icon appears when a task is marked as either low or high priority. Disabling this option will hide the icon regardless of the task’s priority status.

Default value

true

Example

Set the taskPriority property.

 <smart-kanban task-priority></smart-kanban>

Set the taskPriority property by using the HTML Element's instance.

 const kanban = document.querySelector('smart-kanban');
 kanban.taskPriority = false;

Get the taskPriority property.

 const kanban = document.querySelector('smart-kanban');
 let taskPriority = kanban.taskPriority;

taskProgressboolean

Controls whether the task progress bar and the label displaying the number of completed sub-tasks are shown or hidden. When enabled, both visual elements will be visible; when disabled, they will be hidden from view.

Default value

false

Example

Set the taskProgress property.

 <smart-kanban task-progress></smart-kanban>

Set the taskProgress property by using the HTML Element's instance.

 const kanban = document.querySelector('smart-kanban');
 kanban.taskProgress = false;

Get the taskProgress property.

 const kanban = document.querySelector('smart-kanban');
 let taskProgress = kanban.taskProgress;

taskCustomFieldsarray



Defines which custom fields are shown on a task card and how they appear. This property accepts an array of objects, where each object represents a custom field configuration with the following properties:

- 'dataField' (string, required): Specifies the unique key or identifier for the custom field. This determines which value will be displayed on the card.
- 'label' (string, required): The display name or title of the field as it appears on the card.
- 'dataType' (string, required): Indicates the field's data type (e.g., 'string', 'number', 'date'). Used to determine how the field value should be formatted or displayed.
- 'visible' (boolean, optional): If set to 'true', the field is displayed on the card; if 'false', it is hidden. Defaults to 'true' if omitted.
- 'image' (boolean, optional): Set to 'true' if the field value is an image URL or Base64 string. This tells the UI to render the value as an image instead of text.
- 'cover' (boolean, optional): When 'image' is 'true', setting 'cover' to 'true' will display the image as the card’s cover image (typically at the top of the card).

'Example usage:'
'''json
[
{
"dataField": "title",
"label": "Task Title",
"dataType": "string",
"visible": true
},
{
"dataField": "dueDate",
"label": "Due Date",
"dataType": "date"
},
{
"dataField": "avatar",
"label": "Assignee Photo",
"dataType": "string",
"image": true,
"visible": true
},
{
"dataField": "coverImage",
"label": "Project Cover",
"dataType": "string",
"image": true,
"cover": true
}
]
'''
This configuration determines which fields are shown, how they're labeled, their format, and whether any field displays an image or acts as a cover image on the task card.

taskColorEntireSurfaceboolean

The background color of a task is determined by its individual color property. By default, this color is visually represented as an accent along the left border of the task element, rather than filling the entire background. This design helps differentiate tasks based on their assigned colors while maintaining a consistent overall appearance.

Default value

false

Example

Set the taskColorEntireSurface property.

 <smart-kanban task-color-entire-surface></smart-kanban>

Set the taskColorEntireSurface property by using the HTML Element's instance.

 const kanban = document.querySelector('smart-kanban');
 kanban.taskColorEntireSurface = false;

Get the taskColorEntireSurface property.

 const kanban = document.querySelector('smart-kanban');
 let taskColorEntireSurface = kanban.taskColorEntireSurface;

taskSubTasksInputboolean

Displays an input field within the task card, allowing users to dynamically add sub-tasks to the main task. To enable this feature, ensure that the 'taskSubTasks' property is set to a value other than 'none'. When 'taskSubTasks' is appropriately configured, users will see and be able to use the sub-task input interface.

Default value

true

Example

Set the taskSubTasksInput property.

 <smart-kanban task-sub-tasks-input></smart-kanban>

Set the taskSubTasksInput property by using the HTML Element's instance.

 const kanban = document.querySelector('smart-kanban');
 kanban.taskSubTasksInput = false;

Get the taskSubTasksInput property.

 const kanban = document.querySelector('smart-kanban');
 let taskSubTasksInput = kanban.taskSubTasksInput;

taskSubTasks"none" | "onePerRow" | "onlyUnfinished"

Specifies how sub-tasks are rendered within a task card.
- '"none"' *(default)*: Sub-tasks are hidden on the task card and are only visible within the edit dialog.
- '"onePerRow"': All sub-tasks associated with the task are displayed directly on the task card, with each sub-task shown on its own row.
- '"onlyUnfinished"': Only sub-tasks that are not marked as completed are displayed on the task card; completed sub-tasks remain hidden.

Default value

"none"

Example

Set the taskSubTasks property.

 <smart-kanban task-sub-tasks='onePerRow'></smart-kanban>

Set the taskSubTasks property by using the HTML Element's instance.

 const kanban = document.querySelector('smart-kanban');
 kanban.taskSubTasks = 'onlyUnfinished';

Get the taskSubTasks property.

 const kanban = document.querySelector('smart-kanban');
 let taskSubTasks = kanban.taskSubTasks;

taskTagsboolean

Controls whether task tags are shown or hidden in the user interface, allowing users to display or conceal tag information associated with each task.

Default value

true

Example

Set the taskTags property.

 <smart-kanban task-tags></smart-kanban>

Set the taskTags property by using the HTML Element's instance.

 const kanban = document.querySelector('smart-kanban');
 kanban.taskTags = false;

Get the taskTags property.

 const kanban = document.querySelector('smart-kanban');
 let taskTags = kanban.taskTags;

taskUserIconboolean

Controls whether the task user icon is displayed or hidden, allowing you to show or hide the icon representing the user associated with a task.

Default value

true

Example

Set the taskUserIcon property.

 <smart-kanban task-user-icon></smart-kanban>

Set the taskUserIcon property by using the HTML Element's instance.

 const kanban = document.querySelector('smart-kanban');
 kanban.taskUserIcon = false;

Get the taskUserIcon property.

 const kanban = document.querySelector('smart-kanban');
 let taskUserIcon = kanban.taskUserIcon;

textTemplatestring | (settings: { data: any, task: HTMLDivElement, text: string, template?: string }) => void

Specifies the template to use for rendering task text. This property accepts multiple value types:

- A string starting with #, which references the id of a <template> element on the page. The contents of this element will be used as the template.
- A string containing HTML or template markup, which will be parsed and applied directly to the task text.
- A function, which receives the task text (or a template) as input and returns the modified text or template to be used.

This property can be both set to define the template for future tasks, or retrieved to access the currently applied template.

Example

Set the textTemplate property.

 <smart-kanban text-template='true'></smart-kanban>

Set the textTemplate property by using the HTML Element's instance.

 const kanban = document.querySelector('smart-kanban');
 kanban.textTemplate = false;

Get the textTemplate property.

 const kanban = document.querySelector('smart-kanban');
 let textTemplate = kanban.textTemplate;

themestring

Specifies the theme applied to the element. The theme controls the visual appearance, including colors, fonts, and overall style, ensuring a consistent look and feel across the component.

Default value

""

Example

Set the theme property.

 <smart-kanban theme='blue'></smart-kanban>

Set the theme property by using the HTML Element's instance.

 const kanban = document.querySelector('smart-kanban');
 kanban.theme = 'red';

Get the theme property.

 const kanban = document.querySelector('smart-kanban');
 let theme = kanban.theme;

priorityListboolean

Controls the visibility of the priority list (as specified by the priority property) when the user clicks the priority icon. This option is only effective when users have editable privileges enabled, allowing them to modify the priority value. If set to true, the list will appear on icon click; if false, the list will remain hidden.

Default value

false

Example

Set the priorityList property.

 <smart-kanban priority-list></smart-kanban>

Set the priorityList property by using the HTML Element's instance.

 const kanban = document.querySelector('smart-kanban');
 kanban.priorityList = false;

Get the priorityList property.

 const kanban = document.querySelector('smart-kanban');
 let priorityList = kanban.priorityList;

priority{ label: string, value: string }[]

Specifies the available priority levels that can be assigned to Kanban tasks. This array defines each priority as an object containing a label (for display purposes) and a corresponding value (for internal use).
Example: [{label: 'Low', value: 'low'}, {label: 'High', value: 'high'}]
Use this property to customize or extend the set of priority options in your Kanban board.

Properties

labelstring

The priority label displayed.

Default value

""

Get the label property.

 const kanban = document.querySelector('smart-kanban');
 let label = kanban.priority.label;

valuestring

The priority value.

Default value

""

Get the value property.

 const kanban = document.querySelector('smart-kanban');
 let value = kanban.priority.value;

Example

Set the priority property.

 <smart-kanban priority='true'></smart-kanban>

Set the priority property by using the HTML Element's instance.

 const kanban = document.querySelector('smart-kanban');
 kanban.priority = false;

Get the priority property.

 const kanban = document.querySelector('smart-kanban');
 let priority = kanban.priority;

userListboolean

Controls the visibility of the user list—defined by the users property—when the user icon is clicked. This setting is only effective if editable privileges are enabled; otherwise, the user list will not be displayed regardless of this option.

Default value

false

Example

Set the userList property.

 <smart-kanban user-list></smart-kanban>

Set the userList property by using the HTML Element's instance.

 const kanban = document.querySelector('smart-kanban');
 kanban.userList = false;

Get the userList property.

 const kanban = document.querySelector('smart-kanban');
 let userList = kanban.userList;

users{ allowAdd?: boolean, allowComment?: boolean, allowDrag?: boolean, allowEdit?: boolean, allowRemove?: boolean, id: string | number, image?: string, name?: string }[]

Specifies the users eligible to be assigned Kanban tasks, along with their associated attributes (such as name, role, and status) and permissions (such as create, edit, or delete task capabilities).

Properties

allowAddboolean

Sets whether the user has a privilege to add or copy tasks.

Default value

true

Get the allowAdd property.

 const kanban = document.querySelector('smart-kanban');
 let allowAdd = kanban.users[0].allowAdd;

allowCommentboolean

Sets whether the user has a privilege to add comments to tasks.

Default value

true

Get the allowComment property.

 const kanban = document.querySelector('smart-kanban');
 let allowComment = kanban.users[0].allowComment;

allowDragboolean

Sets whether the user has a privilege to drag tasks. Works along with the property allowDrag.

Default value

true

Get the allowDrag property.

 const kanban = document.querySelector('smart-kanban');
 let allowDrag = kanban.users[0].allowDrag;

allowEditboolean

Sets whether the user has a privilege to edit tasks. Works along with the property editable.

Default value

true

Get the allowEdit property.

 const kanban = document.querySelector('smart-kanban');
 let allowEdit = kanban.users[0].allowEdit;

allowRemoveboolean

Sets whether the user has a privilege to remove tasks.

Default value

true

Get the allowRemove property.

 const kanban = document.querySelector('smart-kanban');
 let allowRemove = kanban.users[0].allowRemove;

idstring | number

The user's unique ID. Corresponds to the userId field in the data source and the property currentUser.

Get the id property.

 const kanban = document.querySelector('smart-kanban');
 let id = kanban.users[0].id;

imagestring

A url to an image representing the user.

Default value

""

Get the image property.

 const kanban = document.querySelector('smart-kanban');
 let image = kanban.users[0].image;

namestring

The user's name as it will appear in the Users list and "Assigned to" editor.

Default value

""

Get the name property.

 const kanban = document.querySelector('smart-kanban');
 let name = kanban.users[0].name;

Example

Set the users property.

 <smart-kanban users='true'></smart-kanban>

Set the users property by using the HTML Element's instance.

 const kanban = document.querySelector('smart-kanban');
 kanban.users = false;

Get the users property.

 const kanban = document.querySelector('smart-kanban');
 let users = kanban.users;

Events

changeCustomEvent

This event is triggered whenever any changes are made to the details, status, or properties of an existing task. It allows you to respond programmatically whenever a task is modified, ensuring your application can stay synchronized with the latest task information.

  • Bubbles Yes
  • Cancelable No
  • Interface CustomEvent
  • Event handler property onChange

Arguments

evCustomEvent
ev.detailObject
ev.detail.oldValue - The old data of the task
ev.detail.task - The HTML element of the task whose data has been changed
ev.detail.value - The new data of the task

Methods

isDefaultPrevented

Returns true if the event was prevented by any of its subscribers.

Returns

boolean true if the default action was prevented. Otherwise, returns false.

preventDefault

The preventDefault() method prevents the default action for a specified event. In this way, the source component suppresses the built-in behavior that follows the event.

stopPropagation

The stopPropagation() method of the Event interface prevents further propagation of the current event in the capturing and bubbling phases.

Example

Set up the event handler of change event.

const kanban = document.querySelector('smart-kanban');
kanban.addEventListener('change', function (event) {
    const detail = event.detail,
        oldValue = detail.oldValue,
        task = detail.task,
        value = detail.value;

	// event handling code goes here.
})

closeCustomEvent

This event is triggered when the user closes the edit or prompt dialog, either by submitting changes or canceling the operation. It signals that the dialog has been dismissed and any associated actions, such as saving or discarding input, should be handled.

  • Bubbles Yes
  • Cancelable No
  • Interface CustomEvent
  • Event handler property onClose

Arguments

evCustomEvent

Methods

isDefaultPrevented

Returns true if the event was prevented by any of its subscribers.

Returns

boolean true if the default action was prevented. Otherwise, returns false.

preventDefault

The preventDefault() method prevents the default action for a specified event. In this way, the source component suppresses the built-in behavior that follows the event.

stopPropagation

The stopPropagation() method of the Event interface prevents further propagation of the current event in the capturing and bubbling phases.

Example

Set up the event handler of close event.

const kanban = document.querySelector('smart-kanban');
kanban.addEventListener('close', function (event) {
	// event handling code goes here.
})

closingCustomEvent

This event fires just before the edit or prompt dialog is about to close, giving you an opportunity to intercept the closing action. By calling event.preventDefault() within the event handler, you can cancel the closing operation, allowing you to perform validation or prompt the user before the dialog is dismissed.

  • Bubbles Yes
  • Cancelable Yes
  • Interface CustomEvent
  • Event handler property onClosing

Arguments

evCustomEvent

Methods

isDefaultPrevented

Returns true if the event was prevented by any of its subscribers.

Returns

boolean true if the default action was prevented. Otherwise, returns false.

preventDefault

The preventDefault() method prevents the default action for a specified event. In this way, the source component suppresses the built-in behavior that follows the event.

stopPropagation

The stopPropagation() method of the Event interface prevents further propagation of the current event in the capturing and bubbling phases.

Example

Set up the event handler of closing event.

const kanban = document.querySelector('smart-kanban');
kanban.addEventListener('closing', function (event) {
	// event handling code goes here.
})

columnAddCustomEvent

This event is triggered whenever a new column is successfully added to the data structure or interface. It allows you to respond to the addition of a column, such as updating the user interface, modifying related data, or performing custom logic. The event provides details about the added column, including its name, index, and relevant metadata.

  • Bubbles Yes
  • Cancelable No
  • Interface CustomEvent
  • Event handler property onColumnAdd

Arguments

evCustomEvent
ev.detailObject
ev.detail.label - The column label.
ev.detail.dataField - The column data field.
ev.detail.collapsed - The column's collapsed state.

Methods

isDefaultPrevented

Returns true if the event was prevented by any of its subscribers.

Returns

boolean true if the default action was prevented. Otherwise, returns false.

preventDefault

The preventDefault() method prevents the default action for a specified event. In this way, the source component suppresses the built-in behavior that follows the event.

stopPropagation

The stopPropagation() method of the Event interface prevents further propagation of the current event in the capturing and bubbling phases.

Example

Set up the event handler of columnAdd event.

const kanban = document.querySelector('smart-kanban');
kanban.addEventListener('columnAdd', function (event) {
    const detail = event.detail,
        label = detail.label,
        dataField = detail.dataField,
        collapsed = detail.collapsed;

	// event handling code goes here.
})

columnRemoveCustomEvent

This event is triggered whenever a column is deleted or removed from the data structure, table, or grid. It provides an opportunity to handle any necessary updates or clean-up tasks related to the removal of a column, such as updating the user interface, adjusting data bindings, or modifying underlying data sources. The event typically includes information about the column that was removed, allowing developers to respond dynamically to changes in the structure.

  • Bubbles Yes
  • Cancelable No
  • Interface CustomEvent
  • Event handler property onColumnRemove

Arguments

evCustomEvent
ev.detailObject
ev.detail.label - The column label.
ev.detail.dataField - The column data field.
ev.detail.collapsed - The column's collapsed state.

Methods

isDefaultPrevented

Returns true if the event was prevented by any of its subscribers.

Returns

boolean true if the default action was prevented. Otherwise, returns false.

preventDefault

The preventDefault() method prevents the default action for a specified event. In this way, the source component suppresses the built-in behavior that follows the event.

stopPropagation

The stopPropagation() method of the Event interface prevents further propagation of the current event in the capturing and bubbling phases.

Example

Set up the event handler of columnRemove event.

const kanban = document.querySelector('smart-kanban');
kanban.addEventListener('columnRemove', function (event) {
    const detail = event.detail,
        label = detail.label,
        dataField = detail.dataField,
        collapsed = detail.collapsed;

	// event handling code goes here.
})

columnReorderCustomEvent

This event is triggered whenever a user changes the position of a column, such as by dragging and dropping a column header to rearrange the column order in the table.

  • Bubbles Yes
  • Cancelable No
  • Interface CustomEvent
  • Event handler property onColumnReorder

Arguments

evCustomEvent
ev.detailObject
ev.detail.oldIndex - The column's old index.
ev.detail.index - The column's new index.
ev.detail.column - The column's data object with 'label', 'dataField' and 'collapsed' fields.

Methods

isDefaultPrevented

Returns true if the event was prevented by any of its subscribers.

Returns

boolean true if the default action was prevented. Otherwise, returns false.

preventDefault

The preventDefault() method prevents the default action for a specified event. In this way, the source component suppresses the built-in behavior that follows the event.

stopPropagation

The stopPropagation() method of the Event interface prevents further propagation of the current event in the capturing and bubbling phases.

Example

Set up the event handler of columnReorder event.

const kanban = document.querySelector('smart-kanban');
kanban.addEventListener('columnReorder', function (event) {
    const detail = event.detail,
        oldIndex = detail.oldIndex,
        index = detail.index,
        column = detail.column;

	// event handling code goes here.
})

columnUpdateCustomEvent

This event is triggered whenever the data in a column is updated. It occurs after any changes are made to the value(s) of a column, providing an opportunity to respond to or process the updated data. Listeners can use this event to execute custom logic, such as validating input, persisting changes, or updating related UI components.

  • Bubbles Yes
  • Cancelable No
  • Interface CustomEvent
  • Event handler property onColumnUpdate

Arguments

evCustomEvent
ev.detailObject
ev.detail.oldValue - The column's old label.
ev.detail.value - The column's new label.
ev.detail.column - The column's data object with 'label', 'dataField' and 'collapsed' fields.

Methods

isDefaultPrevented

Returns true if the event was prevented by any of its subscribers.

Returns

boolean true if the default action was prevented. Otherwise, returns false.

preventDefault

The preventDefault() method prevents the default action for a specified event. In this way, the source component suppresses the built-in behavior that follows the event.

stopPropagation

The stopPropagation() method of the Event interface prevents further propagation of the current event in the capturing and bubbling phases.

Example

Set up the event handler of columnUpdate event.

const kanban = document.querySelector('smart-kanban');
kanban.addEventListener('columnUpdate', function (event) {
    const detail = event.detail,
        oldValue = detail.oldValue,
        value = detail.value,
        column = detail.column;

	// event handling code goes here.
})

columnClickCustomEvent

This event is triggered whenever a user clicks on a column header within the data table. It can be used to initiate actions such as sorting the column, displaying a menu, or highlighting the selected column. The event typically provides information about which column was clicked, enabling you to implement custom logic based on the user's interaction.

  • Bubbles Yes
  • Cancelable No
  • Interface CustomEvent
  • Event handler property onColumnClick

Arguments

evCustomEvent
ev.detailObject
ev.detail.label - The column label.
ev.detail.dataField - The column data field.
ev.detail.collapsed - The column's collapsed state.

Methods

isDefaultPrevented

Returns true if the event was prevented by any of its subscribers.

Returns

boolean true if the default action was prevented. Otherwise, returns false.

preventDefault

The preventDefault() method prevents the default action for a specified event. In this way, the source component suppresses the built-in behavior that follows the event.

stopPropagation

The stopPropagation() method of the Event interface prevents further propagation of the current event in the capturing and bubbling phases.

Example

Set up the event handler of columnClick event.

const kanban = document.querySelector('smart-kanban');
kanban.addEventListener('columnClick', function (event) {
    const detail = event.detail,
        label = detail.label,
        dataField = detail.dataField,
        collapsed = detail.collapsed;

	// event handling code goes here.
})

columnDoubleClickCustomEvent

This event is triggered when a user double-clicks on a column header, typically in a data grid or table. It can be used to initiate actions such as resizing the column, sorting data, or displaying additional options related to the selected column.

  • Bubbles Yes
  • Cancelable No
  • Interface CustomEvent
  • Event handler property onColumnDoubleClick

Arguments

evCustomEvent
ev.detailObject
ev.detail.label - The column label.
ev.detail.dataField - The column data field.
ev.detail.collapsed - The column's collapsed state.

Methods

isDefaultPrevented

Returns true if the event was prevented by any of its subscribers.

Returns

boolean true if the default action was prevented. Otherwise, returns false.

preventDefault

The preventDefault() method prevents the default action for a specified event. In this way, the source component suppresses the built-in behavior that follows the event.

stopPropagation

The stopPropagation() method of the Event interface prevents further propagation of the current event in the capturing and bubbling phases.

Example

Set up the event handler of columnDoubleClick event.

const kanban = document.querySelector('smart-kanban');
kanban.addEventListener('columnDoubleClick', function (event) {
    const detail = event.detail,
        label = detail.label,
        dataField = detail.dataField,
        collapsed = detail.collapsed;

	// event handling code goes here.
})

columnShowCustomEvent

This event is triggered whenever a column becomes visible—either when a user selects the "Show" option from the column's action menu, or when the Kanban component's `show` method is programmatically called to reveal the column.

  • Bubbles Yes
  • Cancelable No
  • Interface CustomEvent
  • Event handler property onColumnShow

Arguments

evCustomEvent
ev.detailObject
ev.detail.label - The column label.
ev.detail.dataField - The column data field.

Methods

isDefaultPrevented

Returns true if the event was prevented by any of its subscribers.

Returns

boolean true if the default action was prevented. Otherwise, returns false.

preventDefault

The preventDefault() method prevents the default action for a specified event. In this way, the source component suppresses the built-in behavior that follows the event.

stopPropagation

The stopPropagation() method of the Event interface prevents further propagation of the current event in the capturing and bubbling phases.

Example

Set up the event handler of columnShow event.

const kanban = document.querySelector('smart-kanban');
kanban.addEventListener('columnShow', function (event) {
    const detail = event.detail,
        label = detail.label,
        dataField = detail.dataField;

	// event handling code goes here.
})

columnHideCustomEvent

This event is triggered whenever a column is hidden, either through the column's action menu or programmatically via the Kanban board’s `hide` method. Use this event to execute custom logic or UI updates whenever a column becomes invisible to the user.

  • Bubbles Yes
  • Cancelable No
  • Interface CustomEvent
  • Event handler property onColumnHide

Arguments

evCustomEvent
ev.detailObject
ev.detail.label - The column label.
ev.detail.dataField - The column data field.

Methods

isDefaultPrevented

Returns true if the event was prevented by any of its subscribers.

Returns

boolean true if the default action was prevented. Otherwise, returns false.

preventDefault

The preventDefault() method prevents the default action for a specified event. In this way, the source component suppresses the built-in behavior that follows the event.

stopPropagation

The stopPropagation() method of the Event interface prevents further propagation of the current event in the capturing and bubbling phases.

Example

Set up the event handler of columnHide event.

const kanban = document.querySelector('smart-kanban');
kanban.addEventListener('columnHide', function (event) {
    const detail = event.detail,
        label = detail.label,
        dataField = detail.dataField;

	// event handling code goes here.
})

columnCollapseCustomEvent

This event is triggered whenever a column is collapsed, either by selecting the "Collapse" option from the column's action menu or by programmatically invoking the Kanban board's `collapse` method.

  • Bubbles Yes
  • Cancelable No
  • Interface CustomEvent
  • Event handler property onColumnCollapse

Arguments

evCustomEvent
ev.detailObject
ev.detail.label - The column label.
ev.detail.dataField - The column data field.

Methods

isDefaultPrevented

Returns true if the event was prevented by any of its subscribers.

Returns

boolean true if the default action was prevented. Otherwise, returns false.

preventDefault

The preventDefault() method prevents the default action for a specified event. In this way, the source component suppresses the built-in behavior that follows the event.

stopPropagation

The stopPropagation() method of the Event interface prevents further propagation of the current event in the capturing and bubbling phases.

Example

Set up the event handler of columnCollapse event.

const kanban = document.querySelector('smart-kanban');
kanban.addEventListener('columnCollapse', function (event) {
    const detail = event.detail,
        label = detail.label,
        dataField = detail.dataField;

	// event handling code goes here.
})

columnExpandCustomEvent

This event is triggered whenever a column in the Kanban board is expanded, either by a user selecting the "expand" option from the column's action menu or programmatically through the Kanban component's `expand` method.

  • Bubbles Yes
  • Cancelable No
  • Interface CustomEvent
  • Event handler property onColumnExpand

Arguments

evCustomEvent
ev.detailObject
ev.detail.label - The column label.
ev.detail.dataField - The column data field.

Methods

isDefaultPrevented

Returns true if the event was prevented by any of its subscribers.

Returns

boolean true if the default action was prevented. Otherwise, returns false.

preventDefault

The preventDefault() method prevents the default action for a specified event. In this way, the source component suppresses the built-in behavior that follows the event.

stopPropagation

The stopPropagation() method of the Event interface prevents further propagation of the current event in the capturing and bubbling phases.

Example

Set up the event handler of columnExpand event.

const kanban = document.querySelector('smart-kanban');
kanban.addEventListener('columnExpand', function (event) {
    const detail = event.detail,
        label = detail.label,
        dataField = detail.dataField;

	// event handling code goes here.
})

commentAddCustomEvent

This event is triggered whenever a user adds a comment to a task within the Kanban board. It activates immediately after the comment is successfully posted, allowing you to respond to or process new task comments in real-time.

  • Bubbles Yes
  • Cancelable No
  • Interface CustomEvent
  • Event handler property onCommentAdd

Arguments

evCustomEvent
ev.detailObject
ev.detail.id - The task's id.
ev.detail.value - The comment object. It has 'text: string, time: Date and userId:number' properties.

Methods

isDefaultPrevented

Returns true if the event was prevented by any of its subscribers.

Returns

boolean true if the default action was prevented. Otherwise, returns false.

preventDefault

The preventDefault() method prevents the default action for a specified event. In this way, the source component suppresses the built-in behavior that follows the event.

stopPropagation

The stopPropagation() method of the Event interface prevents further propagation of the current event in the capturing and bubbling phases.

Example

Set up the event handler of commentAdd event.

const kanban = document.querySelector('smart-kanban');
kanban.addEventListener('commentAdd', function (event) {
    const detail = event.detail,
        id = detail.id,
        value = detail.value;

	// event handling code goes here.
})

commentRemoveCustomEvent

This event is triggered whenever a comment is deleted from a task card within the Kanban board. It allows you to perform actions or updates in response to the removal of a comment from any Kanban task.

  • Bubbles Yes
  • Cancelable No
  • Interface CustomEvent
  • Event handler property onCommentRemove

Arguments

evCustomEvent
ev.detailObject
ev.detail.id - The task's id.
ev.detail.value - The comment object. It has 'text: string, time: Date and userId:number' properties.

Methods

isDefaultPrevented

Returns true if the event was prevented by any of its subscribers.

Returns

boolean true if the default action was prevented. Otherwise, returns false.

preventDefault

The preventDefault() method prevents the default action for a specified event. In this way, the source component suppresses the built-in behavior that follows the event.

stopPropagation

The stopPropagation() method of the Event interface prevents further propagation of the current event in the capturing and bubbling phases.

Example

Set up the event handler of commentRemove event.

const kanban = document.querySelector('smart-kanban');
kanban.addEventListener('commentRemove', function (event) {
    const detail = event.detail,
        id = detail.id,
        value = detail.value;

	// event handling code goes here.
})

commentUpdateCustomEvent

This event is triggered whenever an existing comment on a Kanban Task is modified. It occurs after any changes are made to the comment’s content, such as edits or updates, allowing you to respond to or track comment modifications within the Kanban board.

  • Bubbles Yes
  • Cancelable No
  • Interface CustomEvent
  • Event handler property onCommentUpdate

Arguments

evCustomEvent
ev.detailObject
ev.detail.id - The task's id.
ev.detail.value - The comment object. It has 'text: string, time: Date and userId:number' properties.

Methods

isDefaultPrevented

Returns true if the event was prevented by any of its subscribers.

Returns

boolean true if the default action was prevented. Otherwise, returns false.

preventDefault

The preventDefault() method prevents the default action for a specified event. In this way, the source component suppresses the built-in behavior that follows the event.

stopPropagation

The stopPropagation() method of the Event interface prevents further propagation of the current event in the capturing and bubbling phases.

Example

Set up the event handler of commentUpdate event.

const kanban = document.querySelector('smart-kanban');
kanban.addEventListener('commentUpdate', function (event) {
    const detail = event.detail,
        id = detail.id,
        value = detail.value;

	// event handling code goes here.
})

dragEndCustomEvent

This event is triggered when a task is dropped onto a target element within the DOM during a drag-and-drop operation. It allows developers to handle the completion of a drag action by responding to where the task is released. To prevent the default drop behavior—such as moving the element or initiating a browser action—you can call event.preventDefault() within the event handler. This enables you to implement custom logic for handling dropped tasks, such as updating data models, modifying the UI, or triggering other application-specific actions."

  • Bubbles Yes
  • Cancelable Yes
  • Interface CustomEvent
  • Event handler property onDragEnd

Arguments

evCustomEvent
ev.detailObject
ev.detail.container - the Kanban the dragged task(s) is dropped to
ev.detail.data - an object with additional drag details
ev.detail.item - the task that is dragged; if multiple tasks are dragged, this is the task that has been clicked when initiating the drag operation
ev.detail.items - an array with all dragged tasks
ev.detail.originalEvent - the original, browser, event that initiates the drag operation
ev.detail.previousContainer - the Kanban the dragged item(s) is dragged from
ev.detail.target - the element the dragged tasks are dropped to

Methods

isDefaultPrevented

Returns true if the event was prevented by any of its subscribers.

Returns

boolean true if the default action was prevented. Otherwise, returns false.

preventDefault

The preventDefault() method prevents the default action for a specified event. In this way, the source component suppresses the built-in behavior that follows the event.

stopPropagation

The stopPropagation() method of the Event interface prevents further propagation of the current event in the capturing and bubbling phases.

Example

Set up the event handler of dragEnd event.

const kanban = document.querySelector('smart-kanban');
kanban.addEventListener('dragEnd', function (event) {
    const detail = event.detail,
        container = detail.container,
        data = detail.data,
        item = detail.item,
        items = detail.items,
        originalEvent = detail.originalEvent,
        previousContainer = detail.previousContainer,
        target = detail.target;

	// event handling code goes here.
})

draggingCustomEvent

This event is triggered while the user is actively dragging a task, such as during a drag-and-drop operation. It fires continuously as the task is being moved, enabling real-time updates or visual feedback in response to the task's position.

  • Bubbles Yes
  • Cancelable Yes
  • Interface CustomEvent
  • Event handler property onDragging

Arguments

evCustomEvent
ev.detailObject
ev.detail.data - an object with additional drag details
ev.detail.item - the task that is dragged; if multiple tasks are dragged, this is the task that has been clicked when initiating the drag operation
ev.detail.items - an array with all dragged tasks
ev.detail.originalEvent - the original, browser, event that initiates the drag operation

Methods

isDefaultPrevented

Returns true if the event was prevented by any of its subscribers.

Returns

boolean true if the default action was prevented. Otherwise, returns false.

preventDefault

The preventDefault() method prevents the default action for a specified event. In this way, the source component suppresses the built-in behavior that follows the event.

stopPropagation

The stopPropagation() method of the Event interface prevents further propagation of the current event in the capturing and bubbling phases.

Example

Set up the event handler of dragging event.

const kanban = document.querySelector('smart-kanban');
kanban.addEventListener('dragging', function (event) {
    const detail = event.detail,
        data = detail.data,
        item = detail.item,
        items = detail.items,
        originalEvent = detail.originalEvent;

	// event handling code goes here.
})

dragStartCustomEvent

This event is fired when the user initiates a drag action on one or more tasks. During the event, you can access information about the tasks being dragged. If you want to prevent the drag-and-drop operation from starting, you can call event.preventDefault() inside your event handler. This will cancel the dragging process and prevent any associated drag logic or UI changes from occurring.

  • Bubbles Yes
  • Cancelable Yes
  • Interface CustomEvent
  • Event handler property onDragStart

Arguments

evCustomEvent
ev.detailObject
ev.detail.container - the Kanban the dragged task(s) is dragged from
ev.detail.data - an object with additional drag details
ev.detail.item - the task that is dragged; if multiple tasks are dragged, this is the task that has been clicked when initiating the drag operation
ev.detail.items - an array with all dragged tasks
ev.detail.originalEvent - the original, browser, event that initiates the drag operation
ev.detail.previousContainer - the Kanban the dragged item(s) is dragged from

Methods

isDefaultPrevented

Returns true if the event was prevented by any of its subscribers.

Returns

boolean true if the default action was prevented. Otherwise, returns false.

preventDefault

The preventDefault() method prevents the default action for a specified event. In this way, the source component suppresses the built-in behavior that follows the event.

stopPropagation

The stopPropagation() method of the Event interface prevents further propagation of the current event in the capturing and bubbling phases.

Example

Set up the event handler of dragStart event.

const kanban = document.querySelector('smart-kanban');
kanban.addEventListener('dragStart', function (event) {
    const detail = event.detail,
        container = detail.container,
        data = detail.data,
        item = detail.item,
        items = detail.items,
        originalEvent = detail.originalEvent,
        previousContainer = detail.previousContainer;

	// event handling code goes here.
})

filterCustomEvent

This event is triggered immediately after a user applies a filter to refine the displayed data. It indicates that the filter criteria have been set and the view has been updated accordingly. Developers can use this event to perform actions such as fetching new data, updating UI elements, or logging user interactions related to filtering.

  • Bubbles Yes
  • Cancelable No
  • Interface CustomEvent
  • Event handler property onFilter

Arguments

evCustomEvent

Methods

isDefaultPrevented

Returns true if the event was prevented by any of its subscribers.

Returns

boolean true if the default action was prevented. Otherwise, returns false.

preventDefault

The preventDefault() method prevents the default action for a specified event. In this way, the source component suppresses the built-in behavior that follows the event.

stopPropagation

The stopPropagation() method of the Event interface prevents further propagation of the current event in the capturing and bubbling phases.

Example

Set up the event handler of filter event.

const kanban = document.querySelector('smart-kanban');
kanban.addEventListener('filter', function (event) {
	// event handling code goes here.
})

openCustomEvent

This event is triggered whenever the edit or prompt dialog window is displayed to the user. It signals that the user interface has opened a dialog for editing content or requesting input, allowing developers to execute custom logic in response to the dialog becoming visible.

  • Bubbles Yes
  • Cancelable No
  • Interface CustomEvent
  • Event handler property onOpen

Arguments

evCustomEvent

Methods

isDefaultPrevented

Returns true if the event was prevented by any of its subscribers.

Returns

boolean true if the default action was prevented. Otherwise, returns false.

preventDefault

The preventDefault() method prevents the default action for a specified event. In this way, the source component suppresses the built-in behavior that follows the event.

stopPropagation

The stopPropagation() method of the Event interface prevents further propagation of the current event in the capturing and bubbling phases.

Example

Set up the event handler of open event.

const kanban = document.querySelector('smart-kanban');
kanban.addEventListener('open', function (event) {
	// event handling code goes here.
})

openingCustomEvent

This event is fired immediately before the edit or prompt dialog is displayed. You can intercept and prevent the dialog from opening by calling event.preventDefault() within your event handler. This allows you to provide your own custom dialog or take other actions instead of showing the default Kanban dialog. To stop the default Kanban dialog from appearing, simply call event.preventDefault() in the appropriate event handler function.

  • Bubbles Yes
  • Cancelable Yes
  • Interface CustomEvent
  • Event handler property onOpening

Arguments

evCustomEvent
ev.detailObject
ev.detail.comment - The comment that is about to be removed (if applicable).
ev.detail.purpose - The purpose of the dialog to be opened - 'edit' or 'prompt'.
ev.detail.task - The task that is about to be edited or removed (if applicable).

Methods

isDefaultPrevented

Returns true if the event was prevented by any of its subscribers.

Returns

boolean true if the default action was prevented. Otherwise, returns false.

preventDefault

The preventDefault() method prevents the default action for a specified event. In this way, the source component suppresses the built-in behavior that follows the event.

stopPropagation

The stopPropagation() method of the Event interface prevents further propagation of the current event in the capturing and bubbling phases.

Example

Set up the event handler of opening event.

const kanban = document.querySelector('smart-kanban');
kanban.addEventListener('opening', function (event) {
    const detail = event.detail,
        comment = detail.comment,
        purpose = detail.purpose,
        task = detail.task;

	// event handling code goes here.
})

sortCustomEvent

This event is triggered immediately after a sorting operation has been applied to the data set. It signifies that the data has been reordered based on the selected sorting criteria, and any relevant updates or UI refreshes can be performed in response to this change. The event may provide details about the sort field(s), direction (ascending or descending), and the affected data.

  • Bubbles Yes
  • Cancelable No
  • Interface CustomEvent
  • Event handler property onSort

Arguments

evCustomEvent

Methods

isDefaultPrevented

Returns true if the event was prevented by any of its subscribers.

Returns

boolean true if the default action was prevented. Otherwise, returns false.

preventDefault

The preventDefault() method prevents the default action for a specified event. In this way, the source component suppresses the built-in behavior that follows the event.

stopPropagation

The stopPropagation() method of the Event interface prevents further propagation of the current event in the capturing and bubbling phases.

Example

Set up the event handler of sort event.

const kanban = document.querySelector('smart-kanban');
kanban.addEventListener('sort', function (event) {
	// event handling code goes here.
})

taskBeforeAddCustomEvent

This event is fired immediately before a new task is added to the Kanban board. Within the event handler, you can access and modify the task's initial data using event.detail.value (which contains the task details) and event.detail.id (which represents the task's unique identifier). This allows you to customize attributes—such as assigning a specific ID or updating field values—before the task is officially added.

**Example usage:**

```js
kanban.onTaskBeforeAdd = (event) => {
const taskData = event.detail.value; // the task data before it is added
const currentId = event.detail.id; // the proposed task ID
event.detail.id = 'BG12'; // assign a custom ID before adding
// Additional custom logic can be added here
};
```

**Note:** Make any necessary changes to `event.detail.value` or `event.detail.id` within this handler to control how tasks are created and represented on your Kanban board.

  • Bubbles Yes
  • Cancelable No
  • Interface CustomEvent
  • Event handler property onTaskBeforeAdd

Arguments

evCustomEvent
ev.detailObject
ev.detail.value - The task data that is added to the Kanban.
ev.detail.id - The task data id.

Methods

isDefaultPrevented

Returns true if the event was prevented by any of its subscribers.

Returns

boolean true if the default action was prevented. Otherwise, returns false.

preventDefault

The preventDefault() method prevents the default action for a specified event. In this way, the source component suppresses the built-in behavior that follows the event.

stopPropagation

The stopPropagation() method of the Event interface prevents further propagation of the current event in the capturing and bubbling phases.

Example

Set up the event handler of taskBeforeAdd event.

const kanban = document.querySelector('smart-kanban');
kanban.addEventListener('taskBeforeAdd', function (event) {
    const detail = event.detail,
        value = detail.value,
        id = detail.id;

	// event handling code goes here.
})

taskAddCustomEvent

This event fires whenever a new task is added to the Kanban board. The associated event object contains detailed information about the new task, accessible via the event's detail property.

**Example usage:**

```javascript
kanban.onTaskAdd = (event) => {
const taskData = event.detail.value; // Contains the properties of the newly added task
const taskId = event.detail.id; // Unique identifier of the new task
}
```

**Description:**
Use this event to execute custom logic or update your application whenever a user creates a new task. The `event.detail.value` provides the complete task data object, while `event.detail.id` gives you the unique ID assigned to that task.

  • Bubbles Yes
  • Cancelable No
  • Interface CustomEvent
  • Event handler property onTaskAdd

Arguments

evCustomEvent
ev.detailObject
ev.detail.value - The task data that is added to the Kanban.
ev.detail.id - The task data id.

Methods

isDefaultPrevented

Returns true if the event was prevented by any of its subscribers.

Returns

boolean true if the default action was prevented. Otherwise, returns false.

preventDefault

The preventDefault() method prevents the default action for a specified event. In this way, the source component suppresses the built-in behavior that follows the event.

stopPropagation

The stopPropagation() method of the Event interface prevents further propagation of the current event in the capturing and bubbling phases.

Example

Set up the event handler of taskAdd event.

const kanban = document.querySelector('smart-kanban');
kanban.addEventListener('taskAdd', function (event) {
    const detail = event.detail,
        value = detail.value,
        id = detail.id;

	// event handling code goes here.
})

taskRemoveCustomEvent

This event is triggered whenever a task is deleted or removed from the system. It occurs immediately after a task is successfully deleted, allowing you to perform any necessary cleanup, updates, or notifications in response to the removal action.

  • Bubbles Yes
  • Cancelable No
  • Interface CustomEvent
  • Event handler property onTaskRemove

Arguments

evCustomEvent
ev.detailObject
ev.detail.value - The task data that is removed from the Kanban.
ev.detail.id - The task data id.

Methods

isDefaultPrevented

Returns true if the event was prevented by any of its subscribers.

Returns

boolean true if the default action was prevented. Otherwise, returns false.

preventDefault

The preventDefault() method prevents the default action for a specified event. In this way, the source component suppresses the built-in behavior that follows the event.

stopPropagation

The stopPropagation() method of the Event interface prevents further propagation of the current event in the capturing and bubbling phases.

Example

Set up the event handler of taskRemove event.

const kanban = document.querySelector('smart-kanban');
kanban.addEventListener('taskRemove', function (event) {
    const detail = event.detail,
        value = detail.value,
        id = detail.id;

	// event handling code goes here.
})

taskUpdateCustomEvent

This event is triggered whenever a task undergoes an update, such as changes to its status, description, assigned users, due date, or any other task-related property. It allows listeners to respond in real time to modifications made to existing tasks.

  • Bubbles Yes
  • Cancelable No
  • Interface CustomEvent
  • Event handler property onTaskUpdate

Arguments

evCustomEvent
ev.detailObject
ev.detail.value - The task data that is updated.
ev.detail.oldValue - The update task's old data.
ev.detail.id - The task data id.

Methods

isDefaultPrevented

Returns true if the event was prevented by any of its subscribers.

Returns

boolean true if the default action was prevented. Otherwise, returns false.

preventDefault

The preventDefault() method prevents the default action for a specified event. In this way, the source component suppresses the built-in behavior that follows the event.

stopPropagation

The stopPropagation() method of the Event interface prevents further propagation of the current event in the capturing and bubbling phases.

Example

Set up the event handler of taskUpdate event.

const kanban = document.querySelector('smart-kanban');
kanban.addEventListener('taskUpdate', function (event) {
    const detail = event.detail,
        value = detail.value,
        oldValue = detail.oldValue,
        id = detail.id;

	// event handling code goes here.
})

taskClickCustomEvent

This event is fired when a user clicks on a task item, allowing you to execute custom logic in response to the interaction. It provides details about the clicked task, enabling you to access its data or update its state as needed.

  • Bubbles Yes
  • Cancelable No
  • Interface CustomEvent
  • Event handler property onTaskClick

Arguments

evCustomEvent
ev.detailObject
ev.detail.value - The task data.
ev.detail.id - The task data id.

Methods

isDefaultPrevented

Returns true if the event was prevented by any of its subscribers.

Returns

boolean true if the default action was prevented. Otherwise, returns false.

preventDefault

The preventDefault() method prevents the default action for a specified event. In this way, the source component suppresses the built-in behavior that follows the event.

stopPropagation

The stopPropagation() method of the Event interface prevents further propagation of the current event in the capturing and bubbling phases.

Example

Set up the event handler of taskClick event.

const kanban = document.querySelector('smart-kanban');
kanban.addEventListener('taskClick', function (event) {
    const detail = event.detail,
        value = detail.value,
        id = detail.id;

	// event handling code goes here.
})

taskDoubleClickCustomEvent

This event is triggered when a user double-clicks on a task element in the interface. It allows you to detect and respond to double-click actions performed specifically on individual tasks, enabling functionalities such as editing, viewing task details, or initiating other custom behaviors associated with a double-click interaction.

  • Bubbles Yes
  • Cancelable No
  • Interface CustomEvent
  • Event handler property onTaskDoubleClick

Arguments

evCustomEvent
ev.detailObject
ev.detail.value - The task data.
ev.detail.id - The task data id.

Methods

isDefaultPrevented

Returns true if the event was prevented by any of its subscribers.

Returns

boolean true if the default action was prevented. Otherwise, returns false.

preventDefault

The preventDefault() method prevents the default action for a specified event. In this way, the source component suppresses the built-in behavior that follows the event.

stopPropagation

The stopPropagation() method of the Event interface prevents further propagation of the current event in the capturing and bubbling phases.

Example

Set up the event handler of taskDoubleClick event.

const kanban = document.querySelector('smart-kanban');
kanban.addEventListener('taskDoubleClick', function (event) {
    const detail = event.detail,
        value = detail.value,
        id = detail.id;

	// event handling code goes here.
})

Methods

addFilter( filters: any, operator?: string): void

Enables advanced filtering functionality for the data. For example, you can create a `Smart.FilterGroup` object to build complex filters. You might define a filter that checks if a 'Country' field contains the string 'Italy':

```javascript
const filterGroup = new Smart.FilterGroup();
const filterObject = filterGroup.createFilter('string', 'Italy', 'contains');
filterGroup.addFilter('and', filterObject);
kanban.addFilter([['Country', filterGroup]]);
```

In this example, a filter group is created. A filter is then defined to match records where the 'Country' column contains the text 'Italy'. This filter is combined into the group with a logical 'and' operator and finally applied to the Kanban board using the `addFilter` method. This approach supports combining multiple filters with logical operators for dynamic and flexible data querying.

Arguments

filtersany

Filter information. Example: kanban.addFilter([['Country', filterGroup]]);. Each array item is a sub array with two items - 'dataField' and 'filterGroup' object. The 'dataField' is any valid data field from the data source bound to the Kanban like 'dueDate', 'startDate' or custom fields like 'Country'. Filter conditions which you can use in the expressions: '=', 'EQUAL','<>', 'NOT_EQUAL', '!=', '<', 'LESS_THAN','>', 'GREATER_THAN', '<=', 'LESS_THAN_OR_EQUAL', '>=', 'GREATER_THAN_OR_EQUAL','starts with', 'STARTS_WITH','ends with', 'ENDS_WITH', '', 'EMPTY', 'CONTAINS','DOES_NOT_CONTAIN', 'NULL','NOT_NULL'

operator?string

Logical operator between the filters of different fields. Possible values are: 'and', 'or'.


Invoke the addFilter method.

const kanban = document.querySelector('smart-kanban');
kanban.addFilter("[['firstName', filterGroup]], 'and'");

addSort( dataFields: [] | string, orderBy: [] | string): void

Enables customizable sorting functionality for your kanban board data.
You can specify one or more fields to sort by, along with the desired sort order (e.g., 'ascending' or 'descending').
Example usage: kanban.addSort(['Country'], 'ascending');
This will sort the kanban items in ascending order based on the 'Country' field.
You can also pass multiple fields (e.g., kanban.addSort(['Country', 'Name'], 'descending')) to create multi-level sorting.

Arguments

dataFields[] | string

The data field(s) to sort by

orderBy[] | string

The sort direction(s) to sort the data field(s) by. Possible values are: 'ascending' and 'descending'.


Invoke the addSort method.

const kanban = document.querySelector('smart-kanban');
kanban.addSort(["firstName","country"],"ascending");

addTask( data?: any): void

Adds a new task to a specified Kanban column. If no column or task data is provided, an empty task with default values will be created and placed in the first column of the Kanban board.

Arguments

data?any

An object containing the new task's data


Invoke the addTask method.

const kanban = document.querySelector('smart-kanban');
kanban.addTask({"id":18,"text":"New task","status":"toDo","tags":"new, delayed"});

addColumn( data?: any): void

Adds a new column to the Kanban board. If no column data is provided, a blank column with default settings will be created and added. If column data is specified, the column will be initialized with the provided properties.

Arguments

data?any

An object containing the new column's data


Invoke the addColumn method.

const kanban = document.querySelector('smart-kanban');
kanban.addColumn({"dataField":"toDoNew","label":"New column"});

beginEdit( task: number | string | HTMLElement): void

Initiates an edit operation, allowing modifications to be made to the current data or document. This operation typically marks the start of a transaction, enabling changes to be tracked and either saved (committed) or discarded (rolled back) upon completion.

Arguments

tasknumber | string | HTMLElement

The task's id or corresponding HTMLElement


Invoke the beginEdit method.

const kanban = document.querySelector('smart-kanban');
kanban.beginEdit(8);

cancelEdit(): void

Terminates the ongoing edit operation and reverts all unsaved changes, restoring the data to its previous state before the edit began.


Invoke the cancelEdit method.

const kanban = document.querySelector('smart-kanban');
kanban.cancelEdit();

closePanel(): void

Closes any currently open header panel dropdown, ensuring that all active dropdown menus within the header section are hidden from view.


Invoke the closePanel method.

const kanban = document.querySelector('smart-kanban');
kanban.closePanel();

collapse( column: number | string): void

Collapses a Kanban column, minimizing its contents and reducing its width to provide a more compact view of the board. This action hides the tasks within the column while keeping the column header visible, allowing users to focus on other sections of the Kanban board.

Arguments

columnnumber | string

The index or dataField of the column to collapse


Invoke the collapse method.

const kanban = document.querySelector('smart-kanban');
kanban.collapse("done");

clearSelection(): void

Removes any currently selected items or cards within the Kanban board, ensuring that no items remain selected. This action resets the selection state of the Kanban component.


Invoke the clearSelection method.

const kanban = document.querySelector('smart-kanban');
kanban.clearSelection();

hide( column: number | string): void

Conceals a specific column within a Kanban board, making its contents and tasks temporarily invisible to users without deleting any data. This action helps declutter the board or focus attention on other columns. The hidden column can typically be shown again through board settings or controls.

Arguments

columnnumber | string

The index or dataField of the column to hide


Invoke the hide method.

const kanban = document.querySelector('smart-kanban');
kanban.hide("done");

copyTask( task: number | string | HTMLElement): void

Creates a duplicate of an existing task within the same column, preserving all task details such as title, description, assignees, and deadlines. The copied task will appear alongside the original in the same column, allowing for easy modification without affecting the original task.

Arguments

tasknumber | string | HTMLElement

The task's id or corresponding HTMLElement


Invoke the copyTask method.

const kanban = document.querySelector('smart-kanban');
kanban.copyTask(1);

endEdit(): void

Completes the current editing session by finalizing any modifications made and persisting all changes to the underlying data source.


Invoke the endEdit method.

const kanban = document.querySelector('smart-kanban');
kanban.endEdit();

ensureVisible( task: number | string | HTMLElement): HTMLElement

Ensures that the specified task is brought into view within the scrollable container by automatically scrolling to its position. If the operation is successful, the method returns the corresponding HTML element representing the task.

Arguments

tasknumber | string | HTMLElement

The task's id or corresponding HTMLElement

ReturnsHTMLElement

Invoke the ensureVisible method.

const kanban = document.querySelector('smart-kanban');
const result = kanban.ensureVisible(5);

expand( column: number | string): void

Expands a Kanban board column to display all its contents, allowing users to view every card within the column in detail. This functionality makes it easier to manage, organize, and interact with all items in the selected column.

Arguments

columnnumber | string

The index or dataField of the column to expand


Invoke the expand method.

const kanban = document.querySelector('smart-kanban');
kanban.expand("done");

expandAll(): void

Expands every Kanban column to display all hidden or collapsed tasks, ensuring that all items within each column are fully visible.


Invoke the expandAll method.

const kanban = document.querySelector('smart-kanban');
kanban.expandAll("done");

exportData( dataFormat: string, fileName: string, callback?: Function): any

Exports all current data from the Kanban board, including task details, statuses, columns, and any associated metadata, into a structured format (such as JSON or CSV) for backup, sharing, or integration purposes.

Arguments

dataFormatstring

The file format to export to. Supported formats: 'csv', 'html', 'json', 'pdf', 'tsv', 'xlsx', 'xml'.

fileNamestring

The name of the file to export to

callback?Function

A callback function to pass the exported data to (if fileName is not provided)

Returnsany

Invoke the exportData method.

const kanban = document.querySelector('smart-kanban');
const result = kanban.exportData("html","my-kanban");

getColumn( dataField: string): any

Retrieves detailed information about a specific column. The returned value is a JSON object containing the following fields:

- label: The display name of the column.
- dataField: The key or property name associated with the column's data.
- collapsed: A boolean indicating whether the column is currently collapsed.
- collapsible: A boolean specifying if the column can be collapsed or expanded by the user.
- allowRemove: A boolean that determines whether the column can be removed from the view.
- editable: A boolean indicating if the column's cells are editable.
- reorder: A boolean specifying whether the column can be reordered by the user.
- orientation: Describes the orientation of the column, such as "horizontal" or "vertical".

Use this object to access or modify the configuration and behavior of the column in your application interface.

Arguments

dataFieldstring

The column's data field

Returnsany

Invoke the getColumn method.

const kanban = document.querySelector('smart-kanban');
const result = kanban.getColumn("toDo");

getTask( id: number): any

Retrieves detailed information about a specific task. The returned value is a JSON object containing the following fields:

- checklist: An array of checklist items associated with the task
- id: The unique identifier for the task
- color: A string representing the task label or color code
- comments: An array of comment objects related to the task
- history: An array that records the chronological history of changes and activity for the task
- dueDate: The date and time when the task is due
- startDate: The date and time when the task is scheduled to start
- priority: The task's priority level (e.g., low, medium, high)
- progress: The percentage of task completion
- status: The current status of the task (e.g., open, in progress, completed)
- swimlane: The swimlane or category the task is assigned to
- tags: An array of tags or keywords associated with the task
- text: The task title or main summary
- description: Detailed information about the task
- userId: The identifier of the user currently assigned to the task
- createdUserId: The identifier of the user who created the task
- createdDate: The date and time when the task was created
- updatedUserId: The identifier of the user who last updated the task
- updatedDate: The date and time when the task was last updated

This structured JSON object enables developers to access all relevant attributes for rendering and managing tasks within an application.

Arguments

idnumber

The task's id

Returnsany

Invoke the getTask method.

const kanban = document.querySelector('smart-kanban');
const result = kanban.getTask("2");

getSelectedTasks( id: number): any

Retrieves the IDs of all selected tasks.
The returned value is an array, where each element represents the unique 'id' associated with a selected task. If no tasks are selected, the array will be empty.

Arguments

idnumber

The task's id

Returnsany

Invoke the getSelectedTasks method.

const kanban = document.querySelector('smart-kanban');
const result = kanban.getSelectedTasks();

getState(): any

Retrieves the current state of the Kanban board as a comprehensive object. The returned object contains detailed information about the board's configuration and user interactions, structured as follows:

```typescript
{
collapsed: {
// Tracks which Kanban columns or swimlanes are currently collapsed.
// Keys represent the column or swimlane identifiers, and values indicate their collapsed state.
[key: string]: boolean;
},
dataSource: [
// An array of data objects representing all Kanban tasks/cards currently on the board.
// Each item typically includes task details such as id, status, title, description, etc.
],
filtering: {
filters: [
// Array of filter objects currently applied.
// Each filter describes criteria such as field, comparison operator, and value.
],
operator: string;
// Logical operator ("AND"/"OR") used to combine multiple filters.
},
selection: {
selected: [
// Array of IDs or references of currently selected tasks/cards.
],
selectionStart?: number | string;
// Optional: Identifies the first item in a selection range (useful for range selection with shift-click).
selectionInColumn: string;
// ID or name of the column where selection started or is active.
swimlane: string;
// ID or name of the currently active swimlane (if swimlanes are in use).
},
sorting: {
dataFields: [
// Array of fields currently used to sort the Kanban data (e.g., ["priority", "dueDate"]).
],
dataTypes: [
// Corresponding data types for each sorting field (e.g., ["number", "date"]).
],
orderBy: [
// Sort directions corresponding to each field ("asc" or "desc").
]
},
tabs: [
// List of tab states or identifiers, reflecting open and active views within the Kanban UI.
],
visibility: {
taskActions: boolean; // Whether task action buttons are visible.
taskComments: boolean; // Whether task comments are shown.
taskDue: boolean; // Whether due date indicators are visible.
taskPriority: boolean; // Whether task priority display is enabled.
taskProgress: boolean; // Whether task progress bars or indicators are shown.
taskTags: boolean; // Whether tags associated with tasks are visible.
taskUserIcon: boolean; // Whether user or assignee icons are visible on tasks.
}
}
```

This state object enables you to persist, inspect, or restore the Kanban board’s full interactive state, including data, UI settings, filters, sortings, selections, and visibility toggles. It is suitable for use cases such as saving the user’s workspace, synchronizing state across sessions, or debugging Kanban board behavior.

Returnsany

Invoke the getState method.

const kanban = document.querySelector('smart-kanban');
const result = kanban.getState();

loadState( state?: { collapsed: {}, dataSource: [], filtering: { filters: [], operator: string }, selection: { selected: [], selectionStart?: number | string, selectionInColumn: string, swimlane: string }, sorting: { dataFields: [], dataTypes: [], orderBy: [] }, tabs: [], visibility: { taskActions: boolean, taskComments: boolean, taskDue: boolean, taskPriority: boolean, taskProgress: boolean, taskTags: boolean, taskUserIcon: boolean } }): void

Retrieves and initializes the current state of the Kanban board, including all columns, tasks, and their respective statuses, to ensure the user sees the latest project information.

Arguments

state?{ collapsed: {}, dataSource: [], filtering: { filters: [], operator: string }, selection: { selected: [], selectionStart?: number | string, selectionInColumn: string, swimlane: string }, sorting: { dataFields: [], dataTypes: [], orderBy: [] }, tabs: [], visibility: { taskActions: boolean, taskComments: boolean, taskDue: boolean, taskPriority: boolean, taskProgress: boolean, taskTags: boolean, taskUserIcon: boolean } }

An object returned by one of the methods getState or saveState. If not passed, gets saved state from the browser's localStorage.


Invoke the loadState method.

const kanban = document.querySelector('smart-kanban');
kanban.loadState();

moveTask( task: number | string | HTMLElement, newStatus: string): void

Moves a specified task from its current column to a target column within the workflow or board, updating its status and position accordingly.

Arguments

tasknumber | string | HTMLElement

The task's id or corresponding HTMLElement

newStatusstring

The new status of the task (its new column's dataField)


Invoke the moveTask method.

const kanban = document.querySelector('smart-kanban');
kanban.moveTask(11);

openCustomizePanel(): void

Displays the "Customize Tasks" header panel as a dropdown menu, allowing users to access and modify task customization options.


Invoke the openCustomizePanel method.

const kanban = document.querySelector('smart-kanban');
kanban.openCustomizePanel();

openFilterPanel(): void

Displays the "Filter" panel by opening its dropdown menu in the header section, allowing users to access and apply filtering options.


Invoke the openFilterPanel method.

const kanban = document.querySelector('smart-kanban');
kanban.openFilterPanel();

openSortPanel(): void

Displays the "Sort" header panel as a dropdown menu, allowing users to select sorting options for the displayed data.


Invoke the openSortPanel method.

const kanban = document.querySelector('smart-kanban');
kanban.openSortPanel();

removeFilter(): void

Removes all applied filters, displaying the complete, unfiltered dataset.


Invoke the removeFilter method.

const kanban = document.querySelector('smart-kanban');
kanban.removeFilter();

removeSort(): void

Disables any previously applied sorting, returning the data to its original, unsorted order.


Invoke the removeSort method.

const kanban = document.querySelector('smart-kanban');
kanban.removeSort();

removeTask( task: number | string | HTMLElement, prompt?: boolean): void

Deletes a specified task from the task list, permanently removing it from the data store.

Arguments

tasknumber | string | HTMLElement

The task's id or corresponding HTMLElement

prompt?boolean

Whether or not to prompt the user before removing the task


Invoke the removeTask method.

const kanban = document.querySelector('smart-kanban');
kanban.removeTask(2);

removeColumn( dataField: string): void

Removes a specified column from the data set or table, effectively deleting all data contained within that column and updating the structure to reflect its absence. This operation is irreversible and affects any processes or queries that rely on the removed column.

Arguments

dataFieldstring

The column's data field


Invoke the removeColumn method.

const kanban = document.querySelector('smart-kanban');
kanban.removeColumn("toDo");

saveState(): void

Persists the current state of the Kanban board—including all columns, cards, and their order—to the browser's localStorage. This ensures that the user's board layout and content are retained and automatically restored when the page is reloaded or the browser is reopened.


Invoke the saveState method.

const kanban = document.querySelector('smart-kanban');
kanban.saveState();

show( column: number | string): void

Displays a single Kanban column, including the column title and a list of tasks or cards assigned to that column. Ideal for use in Kanban boards to visually organize tasks by status or category within a workflow.

Arguments

columnnumber | string

The index or dataField of the column to show


Invoke the show method.

const kanban = document.querySelector('smart-kanban');
kanban.show("done");

showAllColumns(): void

Displays a comprehensive list of all Kanban columns, including their names, order, and relevant metadata. This allows users or applications to view the complete structure of the Kanban board and manage workflow stages effectively.


Invoke the showAllColumns method.

const kanban = document.querySelector('smart-kanban');
kanban.showAllColumns();

selectTask( task: number | string): void

Selects a specific task from a list or collection, allowing the application to retrieve or highlight the chosen task's details for further actions such as viewing, editing, or managing it.

Arguments

tasknumber | string

The task's id.


Invoke the selectTask method.

const kanban = document.querySelector('smart-kanban');
kanban.selectTask(2);

unselectTask( task: number | string): void

Deselects a previously selected task, removing its active or highlighted status within the user interface.

Arguments

tasknumber | string

The task's id.


Invoke the unselectTask method.

const kanban = document.querySelector('smart-kanban');
kanban.unselectTask(2);

updateTask( task: number | string | HTMLElement, newData: {}): void

Updates the details of an existing task, such as its title, description, status, due date, or assigned user.

Arguments

tasknumber | string | HTMLElement

The task's id or corresponding HTMLElement

newData{}

The new data to visualize in the task.


Invoke the updateTask method.

const kanban = document.querySelector('smart-kanban');
kanban.updateTask(2);

updateColumn( dataField: string, newData: {}): void

Updates the value of a specified column in a database table. This operation allows you to modify existing data by providing the column name and the new value to be set. Optionally, you can specify conditions to ensure that only rows matching certain criteria are updated.

Arguments

dataFieldstring

The new column's data field

newData{}

The new data to visualize in the column.


Invoke the updateColumn method.

const kanban = document.querySelector('smart-kanban');
kanban.updateColumn("toDo");

CSS Variables

--smart-kanban-default-widthvar()

Default value

"1200px"

Default width of Kanban

--smart-kanban-default-heightvar()

Default value

"500px"

Default height of Kanban

--smart-kanban-header-sizevar()

Default value

"35px"

Header size of Kanban (applies to header and column headers)

--smart-kanban-task-min-widthvar()

Default value

"150px"

Min width for Kanban tasks in columns with horizontal orientation

--smart-kanban-task-min-heightvar()

Default value

"80px"

Kanban task min height

--smart-kanban-text-max-heightvar()

Default value

"200px"

Kanban task text part max height

--smart-kanban-user-icon-sizevar()

Default value

"30px"

Kanban user icon size

--smart-kanban-user-list-widthvar()

Default value

"150px"

Kanban user list width

--smart-kanban-user-list-max-heightvar()

Default value

"400px"

Kanban user list max height

--smart-kanban-comments-list-widthvar()

Default value

"350px"

Kanban comments list width

--smart-kanban-comments-list-heightvar()

Default value

"400px"

Kanban comments list height

--smart-kanban-new-comment-heightvar()

Default value

"50px"

Height of new comment section

--smart-kanban-new-comment-height-expandedvar()

Default value

"175px"

Expanded height of new comment section

--smart-kanban-send-button-heightvar()

Default value

"30px"

Height of Send button in new comment section

--smart-kanban-color-band-widthvar()

Default value

"3px"

Kanban color band width (i.e. left border of tasks)

--smart-data-view-paddingvar()

Default value

"10px"

Padding of the CardView and Kanban

--smart-data-view-customize-panel-widthvar()

Default value

"200px"

Width of the CardView and Kanban customize panel (drop down).

--smart-data-view-filter-panel-widthvar()

Default value

"550px"

Width of the CardView and Kanban filter panel (drop down).

--smart-data-view-sort-panel-widthvar()

Default value

"400px"

Width of the CardView and Kanban sort panel (drop down).

--smart-data-view-search-panel-widthvar()

Default value

"250px"

Width of the CardView and Kanban search panel (drop down).

--smart-kanban-add-new-column-widthvar()

Default value

"1fr"

Kanban "+ New status" column width.