Property

inputmode

moves the key layout

why?

keyboard (layout override)

Picks the keyboard without changing type's behavior; it wins when they disagree.

iOS screen for inputmode="numeric" — whole frame, uncroppedthe key layout

Pure digit pad; leading zeros survive.

m--inputmode-numeric--type-text · iOS 26.3 · Simulator · Safari

support & traps
  • The decimal separator follows the device locale

    The iOS decimal pad is locale-dependent: a German-locale iPhone shows a comma key and no period. Setting lang on the element or page does not change the key.

    Do: Accept both "." and "," when parsing and validating; never assume which separator key the user saw.

    CSS-Tricks: Everything You Ever Wanted to Know About inputmode (comment thread)

  • No minus key on iOS digit pads

    The iOS numeric and decimal pads have no minus key. Negative values need a different strategy: a full keyboard, a sign toggle in your UI, or a separate control.