Getting Started with Bryntum TaskBoard in Ionic
Try Ionic demos
Bryntum TaskBoard is delivered with a variety of Ionic demo applications showing its functionality. All demo applications have been verified to be compatible with Node.js 20.
Version requirements
Minimum supported:
- Angular:
9.0.0or higher - TypeScript:
3.6.0or higher (for TypeScript application) - Vite
4.0.0or higher (for application build with Vite)
Recommended:
- Angular:
12.0.0or higher - TypeScript:
4.0.0or higher (for TypeScript application) - Vite
5.0.0or higher (for application build with Vite)
Create Ionic application
To get started, the broad steps are as follows:
- Access to npm registry
- Create Application
- Install component
- Add component to Application
- Apply styles
- Run the application
The application we are about to build together is pretty simple, and will look like the illustration below:
Access to npm registry
You can try out Bryntum components for free using our public Bryntum trial packages. If you have a Bryntum license, please refer to our Npm Repository Guide to access the private Bryntum repository.
Create Application
Similarly to all the examples shipped with the distribution, we will be using Ionic CLI to build Ionic applications.
Type the following command to install Ionic CLI:
npm install -g @ionic/cli
We will then create a basic application with Ionic CLI:
ionic start IonicApp blank --type=angular
Here we are using blank, the most simple starter template for the app.
Ionic can use Angular, React, or Vue. By choosing --type=angular, we tell Ionic CLI to generate an application using Angular.
Feel free to select other defaults if needed following instruction provided in the Ionic Framework Documentation
IonicApp to your preferred application name You can then move to your application folder
cd IonicApp
Install component
From your terminal, update project dependencies using the following commands:
npm install @bryntum/taskboard@npm:@bryntum/taskboard-trial@7.3.0 @bryntum/taskboard-angular@7.3.0
npm install @bryntum/taskboard@7.3.0 @bryntum/taskboard-angular@7.3.0
Add component to Application
Edit the src/app/home/home.module.ts file and add the following:
import { BryntumTaskBoardModule } from '@bryntum/taskboard-angular';
@NgModule({
imports : [
BryntumTaskBoardModule
]
})
Then, edit the src/app/home/home.page.ts file and replace the content with the following:
import { Component, ViewChild} from '@angular/core';
import { BryntumTaskBoardComponent, BryntumTaskBoardProjectModelComponent } from '@bryntum/taskboard-angular';
import { taskBoardProps, projectProps } from './home.config';
@Component({
selector: 'app-home',
templateUrl: 'home.page.html',
styleUrls: ['home.page.scss'],
standalone: false,
})
export class HomePage {
taskBoardProps = taskBoardProps;
projectProps = projectProps;
@ViewChild('taskboard') taskBoardComponent!: BryntumTaskBoardComponent;
@ViewChild('project') projectComponent!: BryntumTaskBoardProjectModelComponent;
}
Bryntum Task Board organizes project tasks and allows you to assign resources to them. For an in-depth introduction to tasks, please refer to the tasks guide.
Add component data
Create a assets/data/data.json file for example data and add the following JSON data to it:
{
"success": true,
"tasks": {
"rows": [
{ "id": 1, "name": "Design landing page", "status": "doing", "description": "Creating layout for the new landing page" },
{ "id": 2, "name": "Set up database schema", "status": "todo", "description": "Define tables and relationships for user data" },
{ "id": 3, "name": "Write API documentation", "status": "done", "description": "Document the REST endpoints for the project" },
{ "id": 4, "name": "Create login screen", "status": "doing", "description": "Implement authentication UI with validation" },
{ "id": 5, "name": "Integrate payment gateway", "status": "todo", "description": "Connect Stripe API to the backend" },
{ "id": 6, "name": "Fix navigation bugs", "status": "done", "description": "Resolve reported issues with navbar links" },
{ "id": 7, "name": "Build notification system", "status": "doing", "description": "Real-time push notifications for events" },
{ "id": 8, "name": "Add unit tests", "status": "todo", "description": "Write tests for services and components" },
{ "id": 9, "name": "Optimize image loading", "status": "done", "description": "Implement lazy loading for large images" },
{ "id": 10, "name": "Deploy staging server", "status": "doing", "description": "Set up CI/CD pipeline for staging environment" },
{ "id": 11, "name": "Create user profile page", "status": "todo", "description": "Design and implement profile management UI" },
{ "id": 12, "name": "Implement role-based access control", "status": "todo", "description": "Restrict features based on user roles" },
{ "id": 13, "name": "Set up error logging", "status": "todo", "description": "Integrate centralized error monitoring tool" },
{ "id": 14, "name": "Improve form validation", "status": "todo", "description": "Enhance validation rules for all forms" },
{ "id": 15, "name": "Add search functionality", "status": "todo", "description": "Implement search bar with filtering options" }
]
},
"resources": {
"rows": [
{ "id": 1, "name": "Angelo" },
{ "id": 2, "name": "Celia" },
{ "id": 3, "name": "Dave" },
{ "id": 4, "name": "Emilia" },
{ "id": 5, "name": "Gloria" },
{ "id": 6, "name": "Henrik" },
{ "id": 7, "name": "Kate" }
]
},
"assignments": {
"rows": [
{ "id": 1, "event": 1, "resource": 1 },
{ "id": 2, "event": 2, "resource": 2 },
{ "id": 3, "event": 3, "resource": 3 },
{ "id": 4, "event": 4, "resource": 4 },
{ "id": 5, "event": 5, "resource": 5 },
{ "id": 6, "event": 6, "resource": 6 },
{ "id": 7, "event": 7, "resource": 7 },
{ "id": 8, "event": 8, "resource": 1 },
{ "id": 9, "event": 9, "resource": 2 },
{ "id": 10, "event": 10, "resource": 3 },
{ "id": 11, "event": 11, "resource": 4 },
{ "id": 12, "event": 12, "resource": 5 },
{ "id": 13, "event": 1, "resource": 5 },
{ "id": 14, "event": 2, "resource": 5 },
{ "id": 15, "event": 3, "resource": 5 },
{ "id": 16, "event": 4, "resource": 5 },
{ "id": 17, "event": 6, "resource": 5 },
{ "id": 18, "event": 7, "resource": 5 }
]
}
}
Create a src/app/home/home.config.ts file with the following content:
import { BryntumTaskBoardProps, BryntumTaskBoardProjectModelProps } from '@bryntum/taskboard-angular';
export const projectProps: BryntumTaskBoardProjectModelProps = {
loadUrl : 'assets/data/data.json',
autoLoad : true
};
export const taskBoardProps: BryntumTaskBoardProps = {
columns : [
{ id : 'todo', text : 'Todo', color : 'deep-orange' },
{ id : 'doing', text : 'Doing', color : 'orange' },
{ id : 'done', text : 'Done', color : 'light-green' }
],
columnField : 'status'
};
And finally, edit the src/app/home/home.page.html file and replace the content with the following:
<ion-content [fullscreen] = "true">
<div id = "container">
<bryntum-task-board-project-model
#project
[loadUrl] = "projectProps.loadUrl!"
[autoLoad] = "projectProps.autoLoad!"
></bryntum-task-board-project-model>
<bryntum-task-board
#taskboard
[project] = "project"
[columns] = "taskBoardProps.columns!"
[columnField] = "taskBoardProps.columnField!"
></bryntum-task-board>
</div>
</ion-content>
Apply styles
Stylesheets
The following CSS files are provided with the Bryntum npm packages or in the /build folder of the distribution:
| File | Contents |
|---|---|
taskboard.css |
Structural CSS |
svalbard-light.css |
Svalbard Light theme |
svalbard-dark.css |
Svalbard Dark theme |
visby-light.css |
Visby Light theme |
visby-dark.css |
Visby Dark theme |
stockholm-light.css |
Stockholm Light theme |
stockholm-dark.css |
Stockholm Dark theme |
material3-light.css |
Material3 Light theme |
material3-dark.css |
Material3 Dark theme |
fluent2-light.css |
Fluent2 Light theme |
fluent2-dark.css |
Fluent2 Dark theme |
fontawesome/css/fontawesome.css |
Font Awesome Free base CSS |
fontawesome/css/solid.css |
Font Awesome Free solid icons |
You'll need to import the structural CSS and the preferred theme into your project for the Bryntum TaskBoard to render correctly, and if you are not replacing the icons used by the component, you will also need to include Font Awesome.
Edit the src/global.scss and add the following:
// FontAwesome is used for icons
@import "~@bryntum/taskboard/fontawesome/css/fontawesome.css";
@import "~@bryntum/taskboard/fontawesome/css/solid.css";
// Structural CSS
@import "~@bryntum/taskboard/taskboard.css";
// Bryntum theme of your choice
@import "~@bryntum/taskboard/svalbard-light.css";
Sizing the component
By default, the Bryntum TaskBoard component is configured to occupy 100% of the parent DOM element with a min-height of 10em.
To display the component at the appropriate size, you can, for example, set parent components to take up the full height of the screen.
In your src/app/home/home.page.scss file, add the following:
#container {
height : 100vh;
}
There are many other solutions depending on the situation. Feel free to adapt the code above regarding your application layout. For more information on the topic, see this guide Sizing the component.
Run the application
From your terminal:
ionic serve
Your application is now available under http://localhost:8100, and your browser should automatically open it for you.
Troubleshooting
Please refer to this Troubleshooting guide.
What to do next?
Further on integration with Ionic
Do you want to know more about how Bryntum TaskBoard integrates with Ionic and starts to customize your application? We provide you with a complete Ionic guide here.
Learn about Data
Bryntum components often use multiple data collections and entities.
For a detailed explanation of how these elements interact, see our guide to tasks in Bryntum TaskBoard.