coderef

user-selectLimited availability

The user-select CSS property controls which elements can be selected by the user.

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

Browser support

DesktopChrome
1–53Not supported
54+Supportedsince Oct 12, 2016
Current: 155
Edge
12–18Not supported
79+Supportedsince Jan 15, 2020
Current: 154
Firefox
1–68Not supported
69+Supportedsince Sep 3, 2019
Current: 157
Safari
✕Not supportedup to 27
Current: 27
MobileChrome Android
18–53Not supported
54+Supportedsince Oct 19, 2016
Current: 155
Firefox Android
4–68Not supported
79+Supportedsince Jul 28, 2020
Current: 157
Safari iOS
✕Not supportedup to 27
Current: 27

How to use

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

Example

Full syntax and examples are on MDN: user-select.

Feature detection

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

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

Sub-features

Support for each part of the feature (5). The overall table above shows when the whole feature works.

Sub-featureChromeEdgeFirefoxSafariChrome AndroidFirefox AndroidSafari iOS
user-select547969✕5479✕
user-select.all547969✕5479✕
user-select.auto547969✕5479✕
user-select.none547969✕5479✕
user-select.text547969✕5479✕