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.
<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
| Class | CSS declarations |
|---|---|
resize | resize: both; |
resize-x | resize: horizontal; |
resize-y | resize: vertical; |
resize-none | resize: none; |
View full generated CSS
.resize {
resize: both;
}
.resize-none {
resize: none;
}
.resize-x {
resize: horizontal;
}
.resize-y {
resize: vertical;
}