I'm writing a wasm statistical calculator, so I need to allow an arbitrarily long number input on my website's front end. My current design looks like this:
A number is entered where the line is. Enter adds a new number input to the end and focuses it. Emptying an input removes it (and similarly focuses the last element), for instance like below:
The 'calculate' button can be clicked/pressed, and the page logic will take place, outputting results above the input.
How can I improve this such that it takes no instruction to use?
Edit
In case the above description of the current design was confusing, here's a GIF
parseNumbers
insrc/utils.ts
in the sandbox link: jx4f4.csb.app<input type="number">
to do number validation. I think "parsing number values" is an entirely different question, and you can make decisions about an implementation yourself. There is no wrong answer—it's your app and your API!