Responsive Engine: adding overlay icon in text Input
In this Bubble.io tutorial video we explore one way to add icons to your text Input fields in your Bubble.io app.
Create an icon overlay: Learn how to add a sleek icon to your input fields using Bubble's new responsive engine!
Master input styling: Discover the secrets to perfectly aligning icons and text in your responsive designs.
Elevate your UI: Transform your form's look with this easy technique for adding professional touches to your Bubble forms.
Creating an Input Field with an Overlay Icon
Here's how to create an input field with an icon that overlays it using the new responsive engine. So, here's my example and I'm going to build up another one that uses the password field. So, I have a group and I have an input and I have an icon.
Setting Up the Group
Let's build those up. First of all, I need to put in a new group and this is going to be a light parent and you'll see why in a moment. Give it 100% width and then I just need enough height to work with. There we go. And then inside I'm going to place my input and my input is going to be centred but I want to take up the whole space of the group. So, let's give it 100% there and let's try 100% here. There we go.
Adding the Icon
The reason for using a light parent is that allows me to control where my icon sits. So if I draw my icon in there, so this is password so we need a lock and I'm just going to make it square. Oh, that's a little bit too big. Let's go down to 24. Better. And so, I can now control where my icon goes. Few more steps as you can probably notice.
Positioning the Icon
So, let's put the icon on the left. And yeah, not perfect because it overlaps the text which we don't want and also it's a little bit too close to the left hand side. So on the icon, I'm going to give it a margin to the left of say 12. And then in order to stop the text from appearing below the icon, I have to edit the style and increase the horizontal padding.
Adjusting the Padding
Okay, 30 wasn't quite enough. Let's go 40 and preview that. Okay, ah, so it's jumping because I built it using the default standard input style. And that has got a conditional statement. There we go. That takes away, well, it reduces from the 30 figure the horizontal padding. So if I remove those, let's try again.
Final Result and Limitations
Okay, you can see now that I have got my icon, I've got my text input. Now here I'm going to illustrate a short falling of this technique because if I was to just imagine I'm inserting a lot of text. Similarly with the input field, the horizontal padding applies to both the left and the right hand edge. So I'd say ideally I'd want the right hand edge to say go up to here. But because I've applied a 30 pixel padding, it's 30 pixels here and 30 pixels there. But if you're happy with that, then this is a really quick way to achieve the look where you have an icon within an input field.
Can't find what you're looking for?
Search our 300+ Bubble tutorial videos. Start learning no code today!
Flexible Pricing Plans to Fit Your No-Code Journey
Choose the plan that aligns with your goals and start building your startup today.
Have questions?
We have answers!
Find answers to common questions about our membership plans, programs, and more.
Both plans offer full access to our learning resources, community, and support. The Annual plan provides a significant discount (over 15%) compared to paying monthly, and it allows you to lock in your rate for a full year.
Absolutely! You can easily upgrade or downgrade your membership plan at any time by logging into your account and selecting the desired plan. Any unused portion of your current plan will be prorated and applied to your new plan.
As a Planet No Code member, you'll receive a discount on our Bubble coaching sessions. Monthly members receive a 10% discount, while Annual members receive a 17.5% discount. To redeem your discount, simply log into your account and book a coaching session through our platform.
Our 8-week intensive mentorship program is designed to provide personalized guidance and support to help you accelerate your startup journey. You'll be matched with a startup expert who will work with you one-on-one to set goals, overcome challenges, and make rapid progress.
To apply for the Mastery Program, simply click the "Request Invitation" button on our pricing page and fill out the application form. Our team will review your application and schedule a call with you to discuss your goals and determine if the program is a good fit for your needs.
We accept all major credit cards, including Visa, Mastercard, American Express, and Discover.
While we don't offer a free trial, we do provide a 14-day money-back guarantee. If you're not completely satisfied with your membership within the first 14 days, simply contact our support team, and we'll issue a full refund.
If you decide that Planet No Code isn't the right fit for you, you can cancel your membership at any time by logging into your account and navigating to the subscription management page. Click the "Cancel Membership" button, and your membership will be terminated at the end of your current billing cycle.