Quickstart
In this guide, we'll go through the steps of bulding a custom component:
Install the CLI
To install the CLI, run on your terminal:
npm i -g flowable-cli
- Make sure you have node version 18 or higher
Login to Flowable
Once it is installed, you will need to log in to the Artifactory and Flowable using the following command.
If you are using an on-premises solution, make sure to check that your environment is set up correctly
flowable login
-
Artifactory login is needed to fetch Flowable npm packages
-
Flowable login supports both on premise and cloud environments
Create your library
We'll need a library where the new custom components would be added:
flowable components init
-
A library is a project designed for front-end components
-
Use your preferred version control system to store them
Finally, let’s go to the newly created library, and don’t forget to install the dependencies.
cd [library-name]
yarn
Create your component
The library is empty, to create our first custom component let's run:
flowable components create
Build your component
There are two parts for every custom component, the configuration and the coding. In the configuration part, you will edit how the component looks in the editor and which properties it has.
Configuration
Navigate to the User menu -> Custom Components and then select your custom component to edit.
Once the component has been configured you can run the next command to have your component typescript types updated with your new configuration:
flowable components types
Every component consists of the next files:
File name | |
|---|---|
{component-name}.tsx | Your implementation of the custom component. It is a React functional component |
config.yml | Configuration for the CLI |
{component-name}.scss | Optional, you can create this file if you decide to style your component with scss. Bear in mind that Tailwind is supported out of the box |
Code
Implement your component, you can use the development server to see your changes live in the editor:
flowable components watch
- You can go to examples for advanced use cases (Soon)
Build the library
Once you are finished you can first buil your library
flowable components build
And then upload it to Flowable Design.
flowable components upload --patch
-
Semver flags
--major,--minorand--patchare available forflowable components upload -
To test your component before make it visible for every user you can run upload with the flag
--draft