Kodza

Phone Input

A real tel input with its country code in front and a searchable list of countries: the number groups itself as it is typed, a pasted or typed +44 picks the country, and the form gets the number in E.164.

Forms No dependencies phonetelcountryforme164keyboard Added Nov 2026
/anim/phone-input/ GitHub Fullscreen

With your AI

Just ask.

Say it to your AI. It gets the exact code below, not its best guess, and knows where it goes.

Add the Kodza Phone Input to my page.

Not plugged in yet?
claude mcp add -t http kodza https://kodza.dev/api/mcp
Also in Codex, Cursor and VS Code.
kodza-phone-input.html
<div class="kodza-phone" data-country="FR">
  <label class="kodza-phone__box">
    <span class="kodza-phone__label">Mobile</span>
    <input class="kodza-phone__native" type="tel" name="mobile" autocomplete="tel" required>
  </label>
  <p class="kodza-phone__note">
    <span class="kodza-phone__hint">We text one code. Not a newsletter.</span>
    <span class="kodza-phone__error" aria-live="polite"></span>
  </p>
</div>

<div class="kodza-phone" data-country="GB" data-countries="GB,IE,FR,BE,NL,DE,ES,IT,PT">
  <label class="kodza-phone__box">
    <span class="kodza-phone__label">Courier contact</span>
    <input class="kodza-phone__native" type="tel" name="courier" autocomplete="tel" value="+44 7700 900123">
  </label>
  <p class="kodza-phone__note">
    <span class="kodza-phone__hint">Only the courier sees it.</span>
    <span class="kodza-phone__error" aria-live="polite"></span>
  </p>
</div>

<div class="kodza-phone" data-countries="US">
  <label class="kodza-phone__box">
    <span class="kodza-phone__label">Mobile, US only</span>
    <input class="kodza-phone__native" type="tel" name="us-mobile" autocomplete="tel">
  </label>
  <p class="kodza-phone__note">
    <span class="kodza-phone__hint">US numbers only. For now.</span>
    <span class="kodza-phone__error" aria-live="polite"></span>
  </p>
</div>

Checked

Checked before you paste.

Robots poked at it before you did. Every component goes through the same checks, and again each time it changes.

What ranLast run
Accessibilityaxe-core 4.10.2: the WCAG 2.1 A and AA rules, plus best practices. 0 issues
KeyboardThe Tab key gets there, and the focus ring shows when it does. Passed
Reduced motionTurn on reduced motion and what moved just appears. Nothing loops. Passed
Light and darkThe same checks on both themes, contrast included. Passed
WordPressPasted into Twenty Twenty-Five, Twenty Twenty-One, Astra, Blocksy, GeneratePress, Hello Elementor, Kadence and OceanWP. Nothing to flag. 8 / 8 themes
Robots checked this. A human with VoiceOver hasn't yet.
KeyboardPress them in the preview
On the country code
  • Opens the list of countries, in the searchEnter/Space/↓/↑
In the search, while it's open
  • Next or previous country, no looping↓/↑
  • Five countries down or upPage Down/Page Up
  • Picks the country, back to the numberEnter
  • Picks the highlighted country and moves onTab
  • Closes it, focus back on the codeEsc
In the number
  • Erases a digit, stepping over the spacesBackspace

More like this

More in Forms