Have HTML Element reference text element

Hi all. I’m trying to insert an HTML element that will respond dynamically to a text field. For example, depending on text field character length, there will be a bottom border, please see photos below.
Screen Shot 2021-05-07 at 10.02.52 AM
The first image is what I am trying to accomplish. The second is how it appears now.

Please please please help me understand how to tie in HTML to the text field. Another option I’m looking into is using Javascript as well.

Do you have the HTML handy?

You can reference dynamic data in HTML snippets. You could pull in the number of characters from an input, multiple that by whatever px you feel a character is worth, and then use that number in your bottom border CSS. Something like below.