# User select

> Utilities for controlling whether the user can select text in an element.

Source: https://www.zenplates.co/documentation/utilities/user-select (Utilities › Interactivity)

| Class          | Properties           |
| -------------- | -------------------- |
| `.select-none` | `user-select: none;` |
| `.select-text` | `user-select: text;` |

## Usage

Use `.select-none` to prevent text from being selected in an element (and its children).

```html
<div class="select-none bg-gray-100 p-4">
  This text is not selectable
</div>
```

Use `.select-text` to allow text to be selected in an element (and its children).

```html
<div class="select-text bg-gray-100 p-4">
  This text is selectable
</div>
```

## Variants

By default, no responsive or hover-state variants are generated for user select utilities.

### Responsive

To include responsive variants like `.md:select-none`, add `"user-select"` to the `$responsive-variants` variable in your theme's `_variables.scss` file when [recompiling your CSS](https://www.zenplates.co/documentation/customization/using-sass-source-files):

```scss
$responsive-variants: (
  // ...
  "user-select",
);
```

### Hover-state

To include hover-state variants like `.hover:select-none`, add `"user-select"` to the `$hover-variants` variable:

```scss
$hover-variants: (
  // ...
  "user-select",
);
```
