I can’t seem to get this input component to resize when I add the floating label to the component.
Figma – 30 Sep 22
I can’t seem to get this input component to resize when I add the floating label to the component.
Hey Nathan, you were already really close with this! The fix I came up with in your file only required a few steps:
Here’s a GIF of the result:
Here’s view-access to the Figma file I used to take these screenshots and GIFs, in case you’d like to have a closer look at the layers and auto layout settings.
Thanks so much!
You’re quite welcome! I’d like to thank you as well 🙏 it’s been over a year since I last did any work with floating label inputs, and your post reminded me I had published a community file a while back where I used a super convoluted auto-layout set up to eliminate the need to have any color fill behind the label (which would be “invisible” so long as it matched the input fill and the background). It worked, but it was complicated and weird 😕
But now that Figma allows us to isolate strokes on frames and gives us absolute positioning I figured I’d revisit it! Pleased that I was able to reduce the layer count from 19 layers to 9, and also simplify the layer structure (it should be much easier to re-style). Check it out!
Your set up looks pretty clean and strong, just wanted to link to this file in case you were interested in an alternate set up. Thanks for starting this thread!
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.