To me, this is a place where Web Components have a lot of potential. Without trying to bake something like this into the HTML spec, there can be many implementations of such an input, which could be used regardless of the front-end tech a project is using.