Layout
Utilities for controlling how an element handles content that is too large for the container.
| Class | Styles |
|---|---|
overflow-auto | overflow: auto; |
overflow-hidden | overflow: hidden; |
overflow-clip | overflow: clip; |
overflow-visible | overflow: visible; |
overflow-scroll | overflow: scroll; |
overflow-x-auto | overflow-x: auto; |
overflow-y-auto | overflow-y: auto; |
overflow-x-hidden | overflow-x: hidden; |
overflow-y-hidden | overflow-y: hidden; |
overflow-x-clip | overflow-x: clip; |
overflow-y-clip | overflow-y: clip; |
overflow-x-visible | overflow-x: visible; |
overflow-y-visible | overflow-y: visible; |
overflow-x-scroll | overflow-x: scroll; |
overflow-y-scroll | overflow-y: scroll; |
Use the overflow-visible utility to prevent content within an element from being clipped:
<div class="overflow-visible ..."> <!-- ... --></div>Note that any content that overflows the bounds of the element will then be visible.
Use the overflow-hidden utility to clip any content within an element that overflows the bounds of that element:
<div class="overflow-hidden ..."> <!-- ... --></div>Use the overflow-auto utility to add scrollbars to an element in the event that its content overflows the bounds of that element:
Scroll vertically
<div class="overflow-auto ..."> <!-- ... --></div>Unlike overflow-scroll, which always shows scrollbars, this utility will only show them if scrolling is necessary.
Use the overflow-x-auto utility to allow horizontal scrolling if needed:
Scroll horizontally
<div class="overflow-x-auto ..."> <!-- ... --></div>Use the overflow-y-auto utility to allow vertical scrolling if needed:
Scroll vertically
<div class="h-32 overflow-y-auto ..."> <!-- ... --></div>Use the overflow-x-scroll utility to allow horizontal scrolling and always show scrollbars unless always-visible scrollbars are disabled by the operating system:
Scroll horizontally