Thunkable Docs
Build an AppDrag and Drop DocsSnap to Place DocsAcademy
Drag and Drop
Drag and Drop
  • What is Thunkable?
  • 🗺️Getting Started
    • Gen AI
    • Getting Started Guide
    • Keyboard Shortcuts
    • Undo Redo
    • Thunkable Account
      • Account Management
    • Preview and Test your App
    • Versioning
    • Data Sources
      • Google Sheets Data Source
      • Airtable Data Source
      • Webflow Data Source
      • Local Table Data Source
    • Project Collaboration
      • Organizations
    • 🎓Sample Apps & Tutorials
      • Thunkable Community Forums
      • Sample Apps
      • Video Tutorials
        • Thunkable Live App
          • How to Test and Troubleshoot with Thunkable Live App
        • Data Source Tutorials
          • Connecting to Data Sources
            • Google Sheets
            • Local Table
          • Create Data in a Thunkable Data Source
          • Read Data in a Thunkable Data Source
          • Update Data in a Thunkable Data Source
          • Delete Data in a Thunkable Data Source
        • User Auth & Management
          • Firebase
            • User Sign-Up, Sign-In, and Auth
            • User Sign Out and Password Reset
          • Google
            • User Sign-Up, Sign-In, Sign-Out, and Auth
          • Apple
            • User Sign-Up, Sign-In, Sign-Out, and Auth
        • Projects
          • How to Save Versions of Your Thunkable Project
          • How to Copy and Customize Public or Sample Thunkable Projects
        • User Interface & Design
          • Screens
            • Save and Reuse Thunkable Screens
            • Change Thunkable Screens with a Button Click
            • Create Scrollable Screens in Your Thunkable App
          • Navigators
            • How to Use the Thunkable Stack Navigator
            • How to Use Thunkable Top and Bottom Tab Navigators
            • How to Use the Thunkable Drawer Navigator
            • Combine Figma Frames with Thunkable Navigators
          • Components
            • How to Use the Visibility Property to Create Modals in Thunkable
          • Data Visualization
            • Customize a Data Viewer
          • Text
            • Implement Text Input Validation
        • Alerts & Notifications
          • Display Alert Messages in Your Thunkable App
          • How to Create Three-Button Alert Messages
        • Files
          • Cloudinary
            • Store and Access Cloudinary Files in Your Thunkable App
        • Camera
          • How to Use the Device’s Camera
          • How to Use the Device’s Video Camera
          • Use the Device’s Camera as a QR or Barcode Scanner
        • Realtime Databases
          • Firebase
            • How to Read Data in a Firebase Realtime Database
            • How to Update Data in a Firebase Realtime Database
        • Advanced Blocks
          • Connect Your Thunkable App to a Web API
        • Thunkable Academy
          • Building Your First Thunkable App
            • Getting Started with Thunkable
            • How to Design a Thunkable App
            • How to Connect a Thunkable App to a Data Source
            • How to Make A Thunkable App Interactive with Blocks
          • Thunkable No Code App Creation Basics
            • Thunkable UI Components and App Features
            • Understanding Thunkable's Drag and Drop Block Builder
            • Design, Develop, Debug, and Deploy Your App
        • Hour of Code
          • 2021 - Build an Informational App
          • 2022 - Build a Scavenger Hunt App
          • 2023 - Build a Translator and Text-to-Speech App
        • App Building
          • How to Build a Translation App in Thunkable
          • How to Create an Image Recognition App with Thunkable
          • How to Create a Text-to-Speech App in Thunkable
  • 🎨App Design
    • User Interface (UI) Components
      • Basic Components
        • Button Component
        • Label Component
        • Rich Text Component
        • Image Component
        • Text Input Component
        • Layout Component
        • Group Component
      • Data Components
        • Simple List Component
        • Data Viewer Components
          • Data Viewer List Component
          • Data Viewer Grid Component
          • Custom Data Viewer
      • Input Components
        • Switch Component
        • Slider Component
        • Checkbox Component
        • Date Input Component
        • Time Input Component
      • Media Components
        • Animation Component
        • Video Component
        • Loading Icon Component
      • Embed Components
        • Web Viewer Component
        • Map Component
        • Canvas Component
        • PDF Reader Component
        • Rating Component
      • Modules
        • Introduction
        • User Guide
      • Generative AI
    • Screens
      • Save and Reuse Screens
      • Improve Thunkable Load Time
    • Navigators
      • Top Tab Navigator
      • Bottom Tab Navigator
      • Drawer Navigator
      • Stack Navigator
    • Figma Integration
  • 🛠️Blocks
    • Thunkable Blocks Overview
    • Core Blocks
      • Control Blocks
      • Logic Blocks
      • Math Blocks
      • Text Blocks
      • Lists Blocks
      • Color Blocks
      • Device Blocks
      • Objects Blocks
      • Variables Overview
        • Connect a Firebase Realtime Database
        • Variables Blocks
      • Functions Blocks
    • App Features Blocks
      • Speech Blocks
      • Sound Blocks
      • Share Blocks
      • Camera Blocks
      • Files Blocks
      • Sign In Blocks
        • User Sign Up, Sign In, and Authentication with Firebase
        • User Sign Up, Sign In, and Authentication with Google
        • User Sign Up, Sign In, and Authentication with Apple
      • Location Blocks
      • Push Notification Blocks
      • In-App Purchase Blocks (with RevenueCat)
      • Data Sources Blocks
      • Alerts Blocks
      • Timer Blocks
      • Sensors Blocks
        • Gyroscope
        • Magnetometer
        • Accelerometer
        • Location Sensor
      • Ads by AdMob
    • Advanced Blocks
      • Web APIs Blocks
        • CORS Policy
        • 🆓No Auth APIs
          • Update Data in a Data Source
          • CRUD Operations
          • Setting Headers
        • 📊Charting APIs
          • Create a chart template
          • Charting in Thunkable
      • Bluetooth Low Energy Blocks
      • OpenAI Services ChatGPT Integration Blocks
      • "Any Component" Blocks
      • JavaScript Web Bridge
  • ⚙️Settings
    • App Settings
      • Tablet View
    • Assets
    • Cloud Variable Viewer
    • Manage your Projects
      • My Projects Page
      • Thunkable Projects
      • Duplicate Project
      • Share Your App
      • Download Your App
        • Download Your App on iOS
        • Download Your App on Android
      • Add to Home Screen
      • Managing Project Storage
      • App Data Privacy
      • Delete Project
  • 📱Publishing
    • Overview
    • Publish to the Apple App Store
      • User Guide
      • Troubleshooting
      • Review Process
      • Tracking Usage Description
    • Publish to Google Play Store
      • User Guide
      • Troubleshooting
      • Review Process
    • Publish as a Web App
      • User Guide
      • Custom Domains
      • Troubleshooting
    • Testing
      • Testing on iOS via TestFlight
      • Testing on Android
    • Troubleshooting
      • Publishing Checklist
      • Generate Screenshots
  • 🎮Gaming
    • Gaming Overview
      • Canvas Label
      • Sprites
      • Sprite Gallery
    • Gaming Blocks
      • Events
      • Motion
      • Looks
      • Direction
      • Sensing
      • Add & Remove
      • Stage
  • 🗃️Additional Resources
    • Release Notes
      • Release Notes 2025
      • Release Notes 2024
      • Release Notes 2023
    • Troubleshooting
      • Can't Sign in to Thunkable?
      • FAQs
    • Minimum Requirements
    • Bugs and Product Feedback
    • App Services and Emulators
Powered by GitBook
On this page
  • What is the Generic Event Block?
  • Using the Generic Event Block
  • The Component Item Block
  • What is the Create Block?
  • Using the Create Block
  • The Component Item Block
  • What is the Clone Block?
  • Using the Clone Block
  • The Clone Item Block
  • What is the Generic Method Block
  • Using the Generic Method Block
  • What is the Generic Set Block?
  • What is the Generic Get Block?
  • Using the Generic Get Block
  • What is the ‘All Components in Container’ Block?
  • Using the ‘All Components in Container’ Block?
  • What is the Remove Block?
  • Using the Remove Block?
  • The Component Block

Was this helpful?

Export as PDF
  1. Blocks
  2. Advanced Blocks

"Any Component" Blocks

PreviousOpenAI Services ChatGPT Integration BlocksNextJavaScript Web Bridge

Last updated 1 year ago

Was this helpful?

The components in the ‘Any Component’ drawer are great tools to use instead of repeatedly using the same combination of blocks. They will also help you use fewer blocks in your app.

For example, to change the colour of any button on the screen to blue (the blocks on the left) we have to use 6 blocks. Using the ‘Any Component’ Blocks (on the right), we only need to use 2 blocks.

What is the Generic Event Block?

With the Generic Event block, you can set when an event will take place.

For example, in the picture below, any button you click on the screen will change the text of Label1 to be “Thunking Is Fun!”.

Using the Generic Event Block

With the first dropdown menu, you can select what type of component you want to handle events for.

With the second dropdown menu, you can choose when an event will take place.

The Component Item Block

If you want to customize the button that you clicked on the screen, you can use this block.

With these blocks, anytime a button is clicked, the text of that button will be set to “I Love Thunkable!”.

What is the Create Block?

With the Create Block, you can program your app to create visible components (things you can see--like button or images) while it is running.

When you use the create block, your app will automatically create something. For example:

This picture shows that when Screen1 Opens, your app will create a button and put it on Screen1.

Using the Create Block

With the first dropdown menu, you can select what type of visible component you want to create.

With the second dropdown menu, you can select where you want to position the component you are creating on the app’s screen.

Note: The options in the second and third drop down will vary depending on which component you select from the first dropdown. The following block creates a new button and places it as the first item on Screen1.

The table below explains the different block options:

Property

Description

As first in

This creates and positions the component as the first item in the specified row, column or screen.

As last in

This creates and positions the component as the last item in the specified row, column or screen.

Before

This creates and positions the component before the component selected in the third dropdown menu.

After

This creates and positions the component after the component selected in the second dropdown menu.

Note: You can replace the third dropdown with any block that represents a visible component using the component block. It can also be a variable function parameter, or any block whose value is a component.

The Component Item Block

If you want to customize the component you just created, you can use this block.

These blocks say, when any button on the screen1 is clicked, create a new label. Next, set the new label’s text to “I was just created!”.

What is the Clone Block?

The clone block makes a copy of an existing component in your app. For example, if you have a button on your screen and want to create another button that looks exactly the same, you can use the clone block to do that.

You can use the clone block instead of repeatedly using the same combination of blocks. This will also help you use less blocks.

Note: You cannot clone screens and invisible components with the clone block.

Using the Clone Block

With the first dropdown menu, you can select the component that you want to clone.

With the second dropdown menu, you can select where you want to position the cloned component relative to another component on the app’s screen.

Property

Description

As first in

This clones and positions the component as the first item in the specified row, column or screen.

As last in

This clones and positions the component as the last item in the specified row, column or screen.

Before

This positions the cloned component before the component selected in the third dropdown menu.

After

This positions the cloned component after the component selected in the third dropdown menu.

Note: The options in the third drop down will vary depending on which component you select from the first dropdown.

The Clone Item Block

If you want to customize a cloned component, you can use this block.

What is the Generic Method Block

The Generic Method Block can be used to call functions for components that were made with the clone or create blocks.

The blocks above say that when Button1 is clicked, create a Web Viewer component and call the reload function for it.

Using the Generic Method Block

With the first dropdown menu, you can select the component you want to call a function for.

The second dropdown menu allows you to select which function you want to call.

Notes: The options in the second drop down will vary depending on which component you select from the first dropdown. Also, the component you plug-in needs to be of the same type as the one in the first dropdown.

What is the Generic Set Block?

The Generic Set Block allows you to change properties such as text and colour of any component that is on the app’s screen.

Using the Generic Set Block

There are two ways to change the text of a component using the Generic Set Block.

  1. Use the dropdown menu to select the component whose text you want to set

2. You can use the Component Item Block with the Generic Set Block to change the text of the component that was clicked.

What is the Generic Get Block?

The Generic Get Block allows you to get properties (such as text and color) of any component that is on the app’s screen.

You can use the dropdown menu to select the component whose text you want to get.

Using the Generic Get Block

There are two ways to get the text of a component using the Generic Get Block.

  1. Use the dropdown menu to select the component you want to get the text for.

2) You can use the Component Block, as well as the Component Item Block, with the Generic Get Block to select the component you want to get the text of.

What is the ‘All Components in Container’ Block?

The ‘All Components in Container’ block groups together all the visible components in a container (ie. Row, Column or Screen) that are of the same type, in a list.

Using the ‘All Components in Container’ Block?

The ‘All Components in Container’ block can be used with the loop block from the control drawer.

The combination of blocks above goes through all the buttons on screen1 and sets the text of each button to “Thunkable!”.

What is the Remove Block?

The Remove Block allows you to delete a component from your app. You can delete a component that you dragged out from the designer, cloned, or made with the create block.

Using the Remove Block?

There are two ways to delete a component using the Remove Block.

  1. Use the dropdown menu to select the component you want to remove from the app.

2. You can use the Component Item Block with the Remove Block to remove the component that was clicked. You can also use a variable, function parameter or any block whose value is a component.

The Component Block

The Component Block has a dropdown menu which lists all the components that are on the screen.

You can select one of the components from the menu and use it within any of the blocks that have an input for a component. Some examples include: the clone, create or generic event block.

With these blocks, when Screen1 is opened, the Component Block sets the text of Button3 to be “I Love Thunkable!”.

When Screen1 opens, these blocks will tell your app to clone Button2, and then set the clone’s text to be “I was just cloned!” (Try this out for yourself ).

In the block above, all of the buttons that are on Screen1 are stored in list. This means that you can use blocks to select items from this list, eg. the first item in 'all Button in Screen1'.

🛠️
here
list
Anytime a button is clicked, the text of that button will be set to “I Love Thunkable!”.
When any button on the screen is clicked, a new button is created at the top of the screen.
When any button is clicked, button1 is cloned and the text of the clone is changed to “I was just cloned!”