Overflow
Overflow utilities control what happens when content is larger than its container. Use them to clip content, add scrollbars, or allow content to overflow visibly.
Overflow classes
.nys-overflow-autooverflow: auto.nys-overflow-hiddenoverflow: hidden.nys-overflow-scrolloverflow: scroll.nys-overflow-visibleoverflow: visibleoverflow-auto
overflow-hidden
<!-- Scrollbar only when needed -->
<div class="nys-overflow-auto" style="max-height: 100px;">
Long content here...
</div>
<!-- Clip overflowing content -->
<div class="nys-overflow-hidden" style="max-height: 100px;">
Long content here...
</div>
Axis-specific overflow
Control overflow on a single axis with -x and -y variants. This is useful for horizontal scrolling containers or vertically clipped content.
Overflow-x
.nys-overflow-x-autooverflow-x: auto.nys-overflow-x-hiddenoverflow-x: hidden.nys-overflow-x-scrolloverflow-x: scroll.nys-overflow-x-visibleoverflow-x: visible<!-- Horizontal scroll when content overflows -->
<div class="nys-overflow-x-auto">
<div style="white-space: nowrap;">
Wide content that may exceed the container width...
</div>
</div>
Overflow-y
.nys-overflow-y-autooverflow-y: auto.nys-overflow-y-hiddenoverflow-y: hidden.nys-overflow-y-scrolloverflow-y: scroll.nys-overflow-y-visibleoverflow-y: visibleNYS Department of Transportation — Maintains over 100,000 miles of highway and more than 7,500 bridges statewide.
Thruway Authority — Operates the 570-mile New York State Thruway, one of the longest toll highways in the United States.
MTA — Provides public transit in the New York metropolitan area, serving millions of riders daily across subway, bus, and rail.
NYSDOT Regions — Divided into 11 regional offices to manage construction, maintenance, and traffic operations locally.
<!-- Vertical scroll when content overflows -->
<div class="nys-overflow-y-auto" style="max-height: 120px;">
Tall content that may exceed the container height...
</div>
Responsive variants
All overflow utilities support responsive prefixes. See Responsive Utilities for breakpoint details.
<!-- Scroll on mobile, visible on desktop -->
<div class="nys-overflow-auto nys-desktop:nys-overflow-visible">
Content that scrolls on small screens
</div>
Edit this page on GitHub (Permissions required)
Last updated: May 22, 2026