inputmodeBaseline · Widely available
The inputmode global HTML attribute gives a hint about what type of data is to be entered into an <input> element, such as text, numeric, or email, so the browser may help the user enter data using an adapted input mechanism, such as an on-screen virtual keyboard.
Supported in all major browsers for at least 30 months — safe to use without fallbacks. Baseline since Dec 7, 2021. Widely available since Jun 7, 2024.
Browser support
DesktopChrome
1–65Not supported
66+Supportedsince Apr 17, 2018
Current: 155Edge
12–18Not supported
79+Supportedsince Jan 15, 2020
Current: 154Firefox
1–94Not supported
95+Supportedsince Dec 7, 2021
Current: 157Safari
1–12Not supported
12.1+Supportedsince Mar 25, 2019
Current: 27MobileChrome Android
18–65Not supported
66+Supportedsince Apr 17, 2018
Current: 155Firefox Android
4–68Not supported
79+Supportedsince Jul 28, 2020
Current: 157Safari iOS
1–12Not supported
12.2+Supportedsince Mar 25, 2019
Current: 27How to use
This feature is Baseline widely available — use it freely, no fallback needed.
Example
Full syntax and examples are on MDN: inputMode.
Feature detection
JS · check before using
if ("HTMLElement" in globalThis && "inputMode" in HTMLElement.prototype) {
// HTMLElement.inputMode is available
}Documentation (MDN)
Specification
Usage share
Sub-features
Support for each part of the feature (2). The overall table above shows when the whole feature works.
| Sub-feature | Chrome | Edge | Firefox | Safari | Chrome Android | Firefox Android | Safari iOS |
|---|---|---|---|---|---|---|---|
| HTMLElement.inputMode | 66 | 79 | 95 | 12.1 | 66 | 79 | 12.2 |
| inputmode | 66 | 79 | 95 | 12.1 | 66 | 79 | 12.2 |