Open wrangelvid opened 1 month ago
number sounds reasonable, but we should think of a clean line to draw with a clear abstraction that shows what and what is not support for Input since I am very much against support things like a calendar for pmndrs/uikit core.
A possible abstraction could be a filter property which excepts a Regex | (text: string) => boolean
. So type="number" implicitly sets the filter property to only filter numbers.
I would not support properties that change the appearance of the Input. This could also mean to rename Input to TextInput and building NumberInput and PasswordInput using TextInput to clarify that Input does not support type="date" etc. What do you think?
I agree with you and think the explicit distinction through the name makes sense as long as we keep code reusability high.
TextInput
, NumberInput
, PasswordInput
would be nice. Are there any other inputs you think are must haves?
The input supports
text
andpassword
as types, and there are many more that exist for the html input. We should consider supporting more of these types and start with a simple one like number.