Quick start guide for Remix integration
This quick start guide will show you how to build a basic Bryntum TaskBoard in a Remix TypeScript application.
Version requirements
Bryntum TaskBoard requires:
- React
16.0.0or higher - TypeScript
3.6.0or higher (for TypeScript applications)
Remix version 2.15.0 requires a Node.js LTS version.
Overview of Remix integration
To demonstrate the integration process, we'll build a simple application that looks like the image below.
Here's a breakdown of the steps we'll follow:
- Access the Bryntum npm registry
- Create a Remix application
- Install the Bryntum TaskBoard component
- Add the Bryntum TaskBoard component to the application
- Apply styles
- Run the application
Access the Bryntum npm registry
Bryntum components are commercial products, hosted in a private Bryntum repository. Please refer to the Bryntum npm repository guide for complete access information.
Create a Remix application
We'll use the Remix quick start guide to create a Remix application.
Create a Remix application by running the following command:
npx create-remix@latest
This command will guide you through setting up the Remix application by asking the following questions:
- Where should we create your new project?
my-remix-taskboard
- Initialize a new git repository?
Yes
- Install dependencies with npm?
Yes
When you've answered the questions, create-remix will create a folder with your project name and install the dependencies.
Change to the new Remix project directory:
cd my-remix-taskboard
Install the Bryntum TaskBoard component
Use the commands below to install the Bryntum TaskBoard package.
Installing the Bryntum TaskBoard component using npm is the quickest way to use our products. First, get access to the Bryntum private npm registry by following the guide in our docs. Once you've logged in to the registry, install the Bryntum TaskBoard component packages:
npm install @bryntum/taskboard @bryntum/taskboard-react
npm install @bryntum/taskboard@npm:@bryntum/taskboard-trial @bryntum/taskboard-react
Install remix-utils to enable client-side rendering functionality.
npm install remix-utils
Managing dependencies
The application configuration may add a caret (^) as a prefix to dependency versions. We recommend avoiding the caret character as a version prefix to maintain full control over upgrades.
Check the generated package.json file and remove the caret character if necessary.
Add the Bryntum TaskBoard component to the application
First, create a configuration file.
In the app folder, create a components folder. Create an app.config.tsx file in the components folder and add the following lines of code to it:
import { BryntumTaskBoardProps } from '@bryntum/taskboard-react';
export const taskboardProps: BryntumTaskBoardProps = {
columns : [
{ id : 'todo', text : 'Todo', color : 'orange' },
{ id : 'doing', text : 'Doing', color : 'blue', tooltip : 'Items that are currently in progress' },
{ id : 'done', text : 'Done' }
],
// Field used to pair a task to a column
columnField : 'status',
project : {
transport : {
load : {
url : 'data.json'
}
},
autoLoad : true
}
};
This file will be used to configure the Bryntum TaskBoard component.
Now create a Bryntum TaskBoard React component.
In the app/components/ folder, create a bryntum.client.tsx file and add the following lines of code to it:
import { BryntumTaskBoard } from '@bryntum/taskboard-react';
import { taskboardProps } from './app.config';
const BryntumClient = () => {
return (
<BryntumTaskBoard
{...TaskBoardProps}
/>
);
};
export default BryntumClient;
The file extension is .client.tsx because Bryntum components are rendered on the client-side only and Remix uses .client.tsx for client-side files.
Let's create a file for example data.
In the public folder, create a folder called data. In the data folder, create a file called data.json and add the following JSON object 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 }
]
}
}
Now we'll create a wrapper component for the Bryntum TaskBoard React component to ensure it renders only on the client side.
Replace the contents of the app/routes/_index.tsx file with the following code:
import { ClientOnly } from 'remix-utils/client-only';
import BryntumClient from '~/components/bryntum.client';
export default function Index() {
return (
<ClientOnly fallback={<h1>Loading Bryntum TaskBoard</h1>}>
{() => <BryntumClient/>}
</ClientOnly>
);
}
Apply styles
To style the Bryntum TaskBoard, create an app/styles/ folder and add an index.css file to it. Paste the following code into index.css:
body,
html {
margin : 0;
display : flex;
flex-direction : column;
height : 100vh;
font-family : Poppins, "Open Sans", Helvetica, Arial, sans-serif;
font-size : 14px;
}
Import the index.css file and a Bryntum theme in Bryntum.client.tsx:
/* FontAwesome is used for icons */
import "@bryntum/taskboard/fontawesome/css/fontawesome.css";
import "@bryntum/taskboard/fontawesome/css/solid.css";
/* Import the structural CSS for taskboard */
import "@bryntum/taskboard/taskboard.css";
/* Import a Bryntum theme */
import "@bryntum/taskboard/svalbard-light.css";
import "../styles/index.css";
This stylesheet imports the Bryntum TaskBoard structural CSS, the Svalbard theme, and gives the page a two-panel layout, with the scheduler above the utilization view. Bryntum provides five themes with light and dark variants that can be customized.
Learn more about styling your Bryntum TaskBoard in our style guide.
Run the application
Start the local development server:
npm run dev
You can access the Bryntum TaskBoard app in your browser at http://localhost:5173/.
Troubleshooting
If you run into any issues, refer to the troubleshooting guide.
What to do next?
Advanced integration with React
Explore our comprehensive React guide to learn more about how Bryntum TaskBoard integrates with React and start customizing your application.
Working with data in Bryntum TaskBoard
Our guide to data binding explains how data can be bound to the component.
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.