Browse documentation

Reference / Interactivity

Resize

Expose the browser’s resize handle and restrict it to a horizontal or vertical axis when needed.

Working example

Drag the textarea handle to add writing room. Vertical resizing keeps the field inside its original column.

HTML
<label class="block">Print notes
  <textarea rows="2" class="mt-1 block w-full resize-y overflow-auto rounded border p-2" placeholder="Add a note"></textarea>
</label>

Class reference

ClassCSS declarations
resizeresize: both;
resize-xresize: horizontal;
resize-yresize: vertical;
resize-noneresize: none;
View full generated CSS
Compiled CSS
.resize {
  resize: both;
}
.resize-none {
  resize: none;
}
.resize-x {
  resize: horizontal;
}
.resize-y {
  resize: vertical;
}