user-select
Controls whether the user can select text within an element. It is often used to prevent text selection on UI elements like buttons or icons.
It is documented as part of the CSS Basic User Interface specification.
Syntax
/* Usage Example */
.unselectable {
user-select: none;
/* prevents accidental text selection on UI components */
}
/* Syntax */
user-select: auto;
user-select: text;
user-select: none;
user-select: all;
/* Global values */
user-select: inherit;
user-select: initial;
user-select: revert;
user-select: revert-layer;
user-select: unset;
user-select Browser support
Widely available
Since
2015 95% global usage
This feature is well established and works across many devices and browser versions. It has been available across browsers since 2015.
54+
69+
3+
79+