Welcome back! In our previous session, we laid the architectural groundwork for your tool pages by mastering responsive grouping. You learned how to create a robust two-column layout that adapts intelligently from desktop to mobile screens. This structural skill is crucial, and today you'll see why as we build the very first utility for your multi-tool platform.
This lesson marks an exciting transition from designing layouts to building real functionality. We will take the responsive structure you built and bring it to life by creating a word and character counter. You'll learn how to use Bubble's dynamic expressions to read data from an input field in real-time and perform calculations on it—all without writing a single line of code. This is where your vision for a functional platform starts to become a tangible reality.
Part 1: Building the Interface
First, we need a user interface for our tool. We'll use the exact two-column responsive layout you created in the last lesson. This practical application will help solidify those grouping concepts.
On a new page in your Bubble editor, please recreate the responsive layout we designed previously. If you saved it, feel free to reuse that page. As a quick reminder, the structure was:
- A main page container set to
Columnlayout. - A centered content wrapper (
Group - Page Padding) with a max-width and padding. - A
Rowcontainer inside it (Group - Tool Columns) that holds our two columns and switches to aColumnlayout on mobile. - Two child groups,
Group - Input ColumnandGroup - Output Column, which will hold our elements.
Once you have this structure ready, let's add the specific elements for our counter tool.
In the Group - Input Column (the left column):
- Add a
Textelement with the content "Enter your text below". - Below the text, add a
Multiline Inputelement. This is where the user will type. Stretch it to fill a good portion of the column.
In the Group - Output Column (the right column):
- Add a
Groupto hold our first statistic. Set its layout toRowand alignment toSpace-between.- Inside this new group, add a
Textelement that says "Character Count". - Add another
Textelement that simply says "0". This will be our dynamic counter.
- Inside this new group, add a
- Duplicate this group.
- Change the first
Textelement in the duplicated group to say "Word Count". - The second
Textelement can remain "0" for now.
- Change the first
Your layout should now clearly show an input area on one side and a results area on the other.
Part 2: Implementing the Character Count
Now, let's make the character counter functional. The magic behind this is Bubble's ability to dynamically reference the properties of any element on the page. Every input element has a value (the text inside it), and Bubble can analyze that value in various ways.
One of the simplest analyses is counting its characters. The expression for this is [Input Element's Name]'s value:number of characters.
This is a fundamental technique in Bubble, as discussed frequently in the Bubble community forums.
How to count characters on multiline input? - Need help - Bubble Forum
This forum thread discusses the exact problem we're solving. It shows how Bubble developers use built-in features to achieve this.
Focus on the first reply by user mikeloc. Notice the expression used in the conditional: the character count expression. This is the core piece of logic we need.
Let's apply this.
- In your editor, click on the "0" text element next to "Character Count".
- Instead of a static number, we'll enter a dynamic expression. Click inside the
Contentbox and selectInsert Dynamic Data. - Choose your
Multiline Inputelement's name. - A new list of options will appear. Select
's value. - Another list will appear. Select
:number of characters. - The expression in the box should now read
MultilineInput A's value:number of characters(your input name might be different).
Now, preview your page. As you type into the multiline input, you'll see the character count update in real-time (with a very slight delay, which is normal).

Part 3: Implementing the Word Count
Counting words requires one extra step, but the logic is just as elegant. We can't directly count words, but we can do something clever:
- Take the full text string from the input.
- Split it into a list of smaller text strings using the space character (" ") as the separator.
- Count how many items are in that new list.
The Bubble expression for this is: [Input Element's Name]'s value:split by ( ):count.
Let's break that down:
- :split by ( ): This operator takes the text and creates a list. When you type a space in the delimiter field, it breaks the text apart at every space.
- :count: This operator simply counts the number of items in the list that was just created.
This is the standard no-code method for counting words in Bubble.
This forum post shows the solution for counting words in a rich text editor, but the expression is identical for a standard input.
Read the short post by jared.gibb. It provides the exact expression we need: 's value:split by ' ':count.
Now, let's implement this in your editor.
- Click on the "0" text element next to "Word Count".
- Click
Insert Dynamic Dataand select yourMultiline Inputelement, followed by's value. - From the next list, choose
:split by. - A pop-up will ask for the
Delimiter. Simply type a single space in theText separatorbox. - Close the pop-up. The expression isn't complete yet. Click
moreat the end of the expression. - From the final list, choose
:count.
The full expression will look something like this: MultilineInput A's value:split by ( ):count.

Go back to your preview page. As you type sentences, you should see both the character and word counts updating automatically. You have now built a fully functional tool!
Your Task: Putting It All Together (15 minutes)
If you haven't been building along, now is the time to put theory into practice. Follow these steps to create your Word & Character Counter tool from a blank page.
- Page Setup: Create a new page. In the
Layouttab, set the pageContainer layouttoColumnandHorizontal alignmenttoCenter. - Main Wrapper: Add a
Groupto the page. Set itsContainer layouttoColumn,Widthto100%, and give it aMax widthof960px. Add40pxof padding on all sides. - Tool Columns: Drag a new
Groupinside the main wrapper. Set itsContainer layouttoRow,Widthto100%, and add40pxofColumn gap. - Responsive Conditional: On this
Rowgroup, add a conditional:When Current page width <= 768, changeContainer layouttoColumn. - Column Groups: Add two
Groupelements inside theRowgroup. Set both toColumnlayout,Min widthof320px, and give them a light grey background to see them clearly. - Add UI Elements:
- In the left group, add a
Multiline Input. - In the right group, add the
Textelements for "Character Count", "Word Count", and the two "0" placeholders.
- In the left group, add a
- Implement Logic:
- Configure the "Character Count" placeholder to display:
Multiline Input's value:number of characters. - Configure the "Word Count" placeholder to display:
Multiline Input's value:split by ( ):count.
- Configure the "Character Count" placeholder to display:
- Test: Preview the page and test your new tool. Check that the responsive behavior works correctly by resizing your browser window.
Conclusion
Congratulations, you've just built your first functional tool! This lesson was a significant step, moving from static design to dynamic application logic. You learned how to harness Bubble's powerful expression system to create a tool that responds instantly to user input.
Key takeaways from today:
- Dynamic expressions are central to Bubble: They allow elements to display data that is calculated in real-time based on other elements.
- Input values can be analyzed: You can access the content of an input field with
's value. - Operators transform data: You used operators like
:number of characters,:split by, and:countto transform raw text into meaningful statistics. - Combining UI and logic: You saw how the responsive layout from our last lesson provides the perfect structure for the functional tool we built today.
You now have a solid foundation for building the other native tools you envision for your platform. In our next lesson, we'll build on this foundation by creating a text case converter (e.g., uppercase, lowercase). This will introduce you to workflows, allowing you to take the text from an input, modify it with a button click, and display the result.