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.
Get the Complete Bundle for Just $99
Access 3 courses, 390+ tutorials, and a vibrant community to support every step of your app-building journey.
Start building with total confidence
No more delays. With 30+ hours of expert content, you’ll have the insights needed to build effectively.
Find every solution in one place
No more searching across platforms for tutorials. Our bundle has everything you need, with 390+ videos covering every feature and technique.
Dive deep into every detail
Get beyond the basics with comprehensive, in-depth courses & no code tutorials that empower you to create a feature-rich, professional app.
Save over 70%!
Valued at $80
Valued at $85
Valued at $30
Valued at $110
Valued at $45
Can't find what you're looking for?
Search our 300+ Bubble tutorial videos. Start learning no code today!
Have questions?
We have answers!
Find answers to common questions about our membership plans, programs, and more.
We're here to help you launch your no code SaaS. Reach out to the team and we'll double check our vast library for useful content. We'll advise you on how we'd tackle the same problem and there's a good chance we'll record the video to help the wider community.
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.