Modules
Last updated
Last updated
Creating modules allows you to save combinations of components and blocks as components or combinations of blocks without UI elements (Logic Modules) outside of the builder experience to reuse in your projects and share them for other Creators to use. Create the component in the component editor once and use it as often as you need in any of your projects.
Thunkable Modules allow you to save and reuse combinations of UI components and blocks in your projects. In this tutorial, you’ll learn how to create, share, import, copy, and edit modules.
Navigate to your Thunkable Project page.
Under Customizations, click on the Modules tab.
Click Create A New Module.
Name your module.
Click Create.
The module editor opens. It is similar to the editor you’re used to designing in, but you’ll notice the screen has a default group component within which to build your module.
From the components library, drag and drop components into the group on the screen.
Resize the group as necessary to achieve your desired design.
Navigate to the Blocks tab.
Build your module's functionality with blocks.
Select Publish Module.
Include Release Notes. For future iterations, you’ll include what changed in the version.
Click Publish.
You can share modules with other Creators using the module's unique URL. When you're ready to share a module:
The module's unique URL is copied to your computer's clipboard.
Share the URL with another Creator. To import your shared module, they will follow these instructions: Import a Module (choosing option 2 in step 4).
Navigate to your Thunkable Project page.
Open an existing project or create a new one.
On the project’s Design tab, click the plus icon next to the Add Components library.
In the modal provided, either:
My Modules tab - Select a Module from the list.
Module Link tab - Type or paste the module's link.
Click Import.
Drag the new module onto your screen.
If another Creator has shared a Module with you, you can remix it following the steps below (you can also remix a previously imported module):
Open the Share a Module in your browser.
Click on Click to Remix near to the top right.
Open your project containing the imported module.
When you hover over the imported module in the component library, a vertical ellipsis appears.
Hover over the vertical ellipsis to display the module's details.
Click on Remix.
You will be given the option to select Remix and Replace or to simply Remix. Remixing creates a copy that can be edited but won't replace the original that you have already imported into your project. Remix and Replace creates a copy that can be edited and replaces the original imported module in your project. Deselect the checkbox if and click Remix to simply make a copy that can be edited.
Navigate to your Thunkable Project page.
Click the Modules tab.
Click the Copy associated with the module you want to make a copy of.
A copy of the module is created.
To make a change to an existing module:
Navigate to your Thunkable Project page.
Click the Modules tab.
Click the Edit associated with the module you want to edit.
Make the necessary changes on the Design and Blocks tabs.
When you’re happy with your module, click Publish in the upper right.
Select Publish Module.
Include Release Notes that state what has changed in this version.
Click Publish.
To apply the edits to a previously imported module:
Open your project containing the imported module.
When you hover over the imported module in the component library, a vertical ellipsis appears.
Hover over the vertical ellipsis to display the module's details.
Click Update to confirm the update.
This action can't be undone and will change all of the instances of this imported module used in the project.
Adding a property to your module allows its properties to be modified after it has been imported into a project.
For example, a page title module. Perfect the design in the module editor, add a property and the associated blocks, and then modify the page title on each screen of the imported project.
To add a property to a module:
Navigate to your Thunkable Project page.
Click the Modules tab.
Click the Edit associated with the module you want to edit.
Navigate to the Blocks tab.
Click the gear icon next to the Module Workspace in the component tree.
Click Add a Property.
Give the event a descriptive name (e.g. page title).
Select the property type (String (text), Boolean (true or false), Number, or Color).
Input the default value, the value the property will have if it is not modified in the project it's imported into.
Click the X in the upper right to close the modal.
To configure the blocks to modify the component's properties when it is later imported into a project:
Navigate to the module editor's block tab.
In the component tree, click Module Workspace to access the module's unique blocks.
Drag the "when Module Initialized" block into the workspace. This event block is triggered when the screen the module is added to opens.
Click the name of the component to which the property applies. In this example, we're changing the page title label.
Drag the relevant block into the "when Module Initialized" block. In our example, we want to be able to modify the page title label's text.
Click Module Workspace.
Drag the property block you created when you added a property to the module and connect it to the existing blocks.
Once a module has been imported into a project, to modify its properties:
Drag and drop the imported module onto your project's screen.
In the module's properties panel, update the module property.
You must view your app with web preview or Thunkable Live to see the module property render. It will not be rendered in the project's designer.
An event is a block that allows the project to react to behavior that occurred inside of the component.
Navigate to your Thunkable Project page.
Click the Modules tab.
Click the Edit associated with the module you want to edit.
Navigate to the Blocks tab.
Click the gear icon next to the Module Workspace in the component tree.
Click Add an Event.
Give the event a descriptive name (e.g. continue button clicked).
Input the parameters the event will take in.
Once you drag and drop a block that refers to the parameter or publish the component, the event's parameters cannot be edited.
Click the X in the upper right to close the modal.
A method is a block that allows the project to trigger behavior to occur inside of the component. When you call a method, it is possible to provide additional information in parameters. When a project calls a component's method, the component has access to the values in the parameters.
Navigate to your Thunkable Project page.
Click the Modules tab.
Click the Edit associated with the module you want to edit.
Navigate to the Blocks tab.
Click the gear icon next to the Module Workspace in the component tree.
Click Add a Method.
Give the method a descriptive name (e.g. change color).
Input the parameters the method will take in (e.g. color).
Press your keyboard's enter or return key.
Once you drag and drop a block that refers to the parameter or publish the component, the method's parameters cannot be edited.
Click the X in the upper right to close the modal.
In this tutorial, you’ll learn how to use methods to trigger behavior in modules.
As part of this beta release, some functionality is not supported. This includes the following:
Modules can't be added to a layout component.
Modules can't be in shared screens.
Creators can't update a module that they do not own. To do so they will need to use the Remix feature.
Building on Modules, Logic Modules are specific to blocks and allow you to to start or trigger an event, set and change properties in your projects, and share them for other Creators to use.
To create a new Logic Module, you can follow the same steps as Create a New Moduleafter clicking on the Logic Modules tab.
To share a Logic Module, you can follow the same steps as Share a Moduleafter clicking on the Logic Modules tab.
Navigate to your Thunkable Project Page
Open an existing project or create a new one.
On the projects blocks editor, click the plus icon next to Logic Modules in the middle of the Blocks panel.
In the modal provided, either:
My Logic Modules tab - Select a Logic Module from the list.
Click Import
The newly imported logic module is available under the heading Logic Modules in the Blocks panel.
To remix a Logic Module that another Creator has shared with you, you can follow the same steps as Remix a Moduleafter clicking on the Logic Modules tab.
To remix an already imported Logic Module you, you can follow the same steps as Remix an Imported Moduleafter clicking on the Logic Modules tab.
To copy a Logic Module you, you can follow the same steps as Copy a Moduleafter clicking on the Logic Modules tab.
To edit a Logic Module, you can follow steps 1-8 in Edit a Moduleafter clicking on the Logic Modules tab.
This action can't be undone and will change all of the instances of this imported module used in the project.
Adding a property to your logic module allows its properties to be modified after it has been imported into a project.
To add a property to a module:
Navigate to your Thunkable Project page.
Click the Logic Modules tab.
Click the Edit associated with the logic module you want to edit.
Click the gear icon next to the Logic Module Workspace in the component tree.
Click Add a Property.
Give the event a descriptive name.
Select the property type (String (text), Boolean (true or false), Number, or Color).
Input the default value, the value the property will have if it is not modified in the project it's imported into.
Click the X in the upper right to close the modal.
An event is a block that allows the project to react to behavior that occurred inside of the component.
Navigate to your Thunkable Project page.
Click the Logic Modules tab.
Click the Edit associated with the module you want to edit.
Click the gear icon next to the Logic Module Workspace in the component tree.
Click Add an Event.
Give the event a descriptive name.
Input the parameters the event will take in.
Once you drag and drop a block that refers to the parameter or publish the component, the event's parameters cannot be edited.
Click the X in the upper right to close the modal.
A method is a block that allows the project to trigger behavior to occur inside of the component. When you call a method, it is possible to provide additional information in parameters. When a project calls a component's method, the component has access to the values in the parameters.
Navigate to your Thunkable Project page.
Click the Logic Modules tab.
Click the Edit associated with the module you want to edit.
Click the gear icon next to the Logic Module Workspace in the component tree.
Click Add a Method.
Give the method a descriptive name.
Input the parameters the method will take in.
Press your keyboard's enter or return key.
Once you drag and drop a block that refers to the parameter or publish the component, the method's parameters cannot be edited.
Click the X in the upper right to close the modal.
Have feedback on this doc? Please take a moment to share your feedback here: Thunkable Docs Feedback. Your valuable insights will help us improve and better serve you in the future.
When you’re happy with your module, click the Publish icon in the upper right.
In the component editor, click the Share icon in the upper right.
The newly imported module is available under the heading Modules in the component library.
Make any desired changes and then click Publish to make available for importing into a project's component library.
Make the desired changes to the copy and click Publish to make available for importing into a project's component library.
To apply the changes you made in the component editor to the components you added to your screens within this project, click Update.
Module Link Tab - Type or paste the logic module's link.