coderef

ime-modeLimited availability

The ime-mode CSS property sets the state of the input method editor for text fields.

Not yet supported in all major browsers — check the table and provide a fallback.

Discouraged: You should not modify the state of input method editor. Instead, you should use hints (such as a lang or inputmode attribute) to help the browser select the right user interface for text input. Use instead: inputmode, lang

Browser support

DesktopChrome
✕Not supportedup to 155
Current: 155
Edge
✕Not supportedup to 154
Current: 154
Firefox
1–2Not supported
3+Supportedsince Jun 17, 2008
Current: 157
Safari
✕Not supportedup to 27
Current: 27
MobileChrome Android
✕Not supportedup to 155
Current: 155
Firefox Android
4+Supportedsince Mar 29, 2011
Current: 157
Safari iOS
✕Not supportedup to 27
Current: 27

How to use

Not supported in Chrome, Edge, Safari, Chrome Android, Safari iOS. Use feature detection below and provide a fallback (or a polyfill) for those browsers.

Example

Full syntax and examples are on MDN — see the links below.

Feature detection

CSS · check before using
@supports (ime-mode: initial) {
  /* styles that rely on ime-mode */
}

/* or in JavaScript */
if (CSS.supports("ime-mode", "initial")) {
  // use it
}