what i learned about libraries is that, they are made of the main technology but for canvas the main technology is already slow so how are the canvas libraries faster
I think here you will find a way
https://www.w3schools.com/css/css3_flexbox_container.asp
specially in this example https://www.w3schools.com/css/tryit.asp?filename=trycss3_flexbox_align-items_baseline
first of all let's try to solve what do you mean step by step because i'm also not an expert but i may tell you what to do or where to find the hint for doing it,
1- the first thing can you get the value that you add it to the text input or not ?
please answer it to get to the second step.
Because i still didn't get what do you mean well, could you take a look at the link below, and tell me whether is has what you're looking for or not
https://www.w3schools.com/html/html_images_picture.asp