Home/Utilities/Overflow

Overflow

Control how content is clipped or scrolled when it overflows its container. All classes support responsive prefixes.

Overflow

Apply overflow to both axes simultaneously.

.overflow-hidden

Long text that gets clipped at the edge of the container without any scrollbar appearing.

.overflow-auto

Long text that is scrollable when it exceeds the container height. Scroll to see more content inside this box.

.overflow-visible

Overflowing content is not clipped.
<div class="overflow-hidden">...</div>
<div class="overflow-auto">...</div>
<div class="overflow-scroll">...</div>
<div class="overflow-visible">...</div>
<div class="overflow-clip">...</div>
ClassCSS
.overflow-visibleoverflow: visible
.overflow-hiddenoverflow: hidden
.overflow-clipoverflow: clip
.overflow-scrolloverflow: scroll
.overflow-autooverflow: auto

Axis-specific overflow

Use -x- and -y- variants to control overflow on a single axis.

<!-- Horizontal scroll, vertical clip -->
<div class="overflow-x-auto overflow-y-hidden">...</div>

<!-- Vertical scroll only -->
<div class="overflow-y-auto overflow-x-hidden">...</div>
ClassCSS
.overflow-x-visibleoverflow-x: visible
.overflow-x-hiddenoverflow-x: hidden
.overflow-x-clipoverflow-x: clip
.overflow-x-scrolloverflow-x: scroll
.overflow-x-autooverflow-x: auto
.overflow-y-visibleoverflow-y: visible
.overflow-y-hiddenoverflow-y: hidden
.overflow-y-clipoverflow-y: clip
.overflow-y-scrolloverflow-y: scroll
.overflow-y-autooverflow-y: auto
Responsive variants. All overflow utilities support breakpoint prefixes - e.g. md:overflow-hidden, lg:overflow-x-auto.