Create a new block
Creating a new block on Typebot is pretty easy and straightforward using our in-house framework The Forge.
If you are considering merging this new block to the official Typebot repository, make sure to open a Github issue first. This will allow us to discuss the specficiation and the best way to implement it.
-
Create a new branch:
-
Create your new block using the Forge CLI:
-
The files should be generated in
packages/forge/blocks/YOUR_BLOCK_NAME
-
Add the block SVG logo in
packages/forge/blocks/YOUR_BLOCK_NAME/logo.tsx
-
Right away you should be able to run the application and see your newly created logo in the sidebar of the editor.
-
Create a new action in the
packages/forge/blocks/YOUR_BLOCK_NAME/actions
folder. See Action for more information. -
List this action in the
actions
array inpackages/forge/blocks/YOUR_BLOCK_NAME/index.tsx
-
To go further, check out the Forge documentation.
Make sure to check out other blocks implementations in the packages/forge/blocks folder.
Video tutorials
Make sure to join our Discord community to participate to these weekly office hours.