I am currently working on styling an input to only accept numbers while allowing the user to add a unit of measurement (such as kg, km, etc.) immediately after the value. I prefer not to use span because I want the unit measurement to appear as the user starts typing, with a single letter space between the number and the unit. My project involves TypeScript and React hooks.
I would greatly appreciate it if we could set limits on the input values to prevent them from exceeding the width of the input field. Additionally, I would like to see a version using Form.Control instead of a standard input, in case I need to implement a similar feature in the future using Forms.