A lot of phone inputs require installing a large library.
But if you only need a country selector and a number field, why add the extra weight?
SonoJS Phone Input keeps it simple: country selection, dial codes, optional country flags, and a phone number field. No phone validation package required.
npx @sonojs/ui@latest add phone-input

Top comments (2)
Keeping the picker and number field light is a good call β a lot of phone inputs bury you in a dependency you only half use. The one piece I wouldn't skip is validation: dial code alone doesn't tell you whether the national number is plausible, so it's worth separating the UI component from a pluggable validator (E.164 normalization plus per-country length/pattern rules), and pulling in a fuller library only where the form needs real sign-up accuracy. That separation also keeps the control reusable across desktop and web forms without dragging validation rules into every bundle.
Thanks, really appreciate your feedback! π
That's exactly what we're aiming for with SonoJS. We want developers to have simple, lightweight components they can just copy, use, and make their own. No extra packages to install, no unnecessary dependencies. You get the component and it's all yours. That's the whole idea!