Interactivity

overscroll-behavior

Setting what a browser does when reaching the boundary of a scrolling area.

Overview

ClassDeclarations
overscroll-behavior:autooverscroll-behavior: auto;
overscroll-behavior:containoverscroll-behavior: contain;
overscroll-behavior:noneoverscroll-behavior: none;
overscroll-behavior-x:autooverscroll-behavior-x: auto;
overscroll-behavior-y:autooverscroll-behavior-y: auto;
overscroll-behavior-x:containoverscroll-behavior-x: contain;
overscroll-behavior-y:containoverscroll-behavior-y: contain;
overscroll-behavior-x:noneoverscroll-behavior-x: none;
overscroll-behavior-y:noneoverscroll-behavior-y: none;
overscroll-behavior:<value>overscroll-behavior: <value>;
overscroll-behavior-x:<value>overscroll-behavior-x: <value>;
overscroll-behavior-y:<value>overscroll-behavior-y: <value>;

Examples

Contain nested scrolling

Use overscroll-behavior:contain on a scroll area when reaching its edge should not chain scrolling to the page behind it.

<div class="overflow:auto overscroll-behavior:contain">    Modal content</div>
Generated CSS
@layer utilities {    .overscroll-behavior\:contain {        overscroll-behavior: contain    }}

Block page bounce on one axis

Use axis-specific utilities when only vertical or horizontal scroll chaining should be controlled.

<div class="overflow-y:auto overscroll-behavior-y:none">    Sheet</div>

Keep horizontal gestures local

Horizontal carousels often need overscroll-behavior-x:contain so a sideways gesture stays inside the carousel.

<div class="overflow-x:auto overscroll-behavior-x:contain">    Carousel</div>

Apply conditionally

Apply styles based on different states using selectors and conditional queries.

<div class="overscroll-behavior:contain overscroll-behavior:auto@sm overscroll-behavior:auto@print">...</div>

  • Master UI


© 2026 Aoyue Design LLC.MIT License
Trademark Policy