Browse documentation

Reference / Interactivity

Text selection

Allow ordinary text selection, select an entire value at once, or prevent selection on a decorative element.

Working example

Select part of the edition code to select the whole value. Leave the surrounding paragraph available for normal text selection.

HTML
<p>Edition code <code class="select-all rounded border px-2 py-1 font-mono">MONO-P02</code></p>

Class reference

ClassCSS declarations
select-autouser-select: auto;
select-noneuser-select: none;
select-textuser-select: text;
select-alluser-select: all;
View full generated CSS
Compiled CSS
.select-all {
  user-select: all;
}
.select-auto {
  user-select: auto;
}
.select-none {
  user-select: none;
}
.select-text {
  user-select: text;
}