Doesn't a plain old <input> do it the way the platform does it?
There are some things where the browser will apply platform conventions, but nothing resembling the consistency you'd expect from (well-designed) native apps.
[1] https://developer.mozilla.org/en-US/docs/Web/CSS/system-colo...