User Select
Controls the ability of the user to select text in an element.
Limited availability
This feature does not work in some of the most widely-used browsers.
| Class | Style |
|---|---|
us-a | user-select: all; |
us-auto | user-select: auto; |
us-none | user-select: none; |
us-t | user-select: text; |
Auto
Initial value
Allows the browser to determine the default selection behavior based on the element's content.
<p class="fs-lg tc-slate us-auto">Sphinx of black quartz, judge my vow.</p>All
Allows the user to select all text within the element when clicked or dragged over.
<p class="fs-lg tc-slate us-a">Sphinx of black quartz, judge my vow.</p>None
Prevents the user from selecting any text within the element.
<p class="fs-lg tc-slate us-none">Sphinx of black quartz, judge my vow.</p>Text
Allows the user to select text within the element, enabling text selection while preventing selection of other elements.
<p class="fs-lg tc-slate us-t">Sphinx of black quartz, judge my vow.</p>Using utility variants
Learn how to override existing utilities based on the user's screen size or other factors, such as hover states.
Targeting different viewports
You can combine responsive breakpoints like sm:us-*, md:us-*, lg:us-*, and xxl:us-* to allow targeting specific utilities in different viewports.
Targeting hover states
Alternatively, you can apply :hover by using h:us-* utility to override elements and change their values when hovering over them.