Browse documentation

Reference / Layout

Overscroll behavior

Control how reaching the end of a scrolling panel affects scrolling in its parent.

Working example

Contain the vertical axis on a nested panel when wheel or touch scrolling should stop at the end of its notes.

HTML
<div tabindex="0" role="region" aria-label="Packing notes"
  class="h-20 overflow-y-auto overscroll-y-contain border p-3">
  <p>Fold the proof along the spine.</p>
  <p class="my-4">Check the margins at each corner.</p>
  <p>Wrap the edition in tissue.</p>
</div>

Class reference

ClassCSS declarations
overscroll-autooverscroll-behavior: auto;
overscroll-containoverscroll-behavior: contain;
overscroll-noneoverscroll-behavior: none;
overscroll-x-containoverscroll-behavior-x: contain;
overscroll-y-containoverscroll-behavior-y: contain;
View full generated CSS
Compiled CSS
.overscroll-auto {
  overscroll-behavior: auto;
}
.overscroll-contain {
  overscroll-behavior: contain;
}
.overscroll-none {
  overscroll-behavior: none;
}
.overscroll-x-contain {
  overscroll-behavior-x: contain;
}
.overscroll-y-contain {
  overscroll-behavior-y: contain;
}