--- id: slds.guidance.utilities.scrollable title: Scrollable Utilities description: SLDS scrollable utility classes for managing overflow behavior summary: "Utilities for controlling scroll behavior (x, y, both, none)." artifact_type: reference domain: utilities topic: scrollable content_format: structured complexity: intermediate audience: [implementer] tasks: [implement] refs: - slds.guidance.utilities - slds.guidance.overview.utilities tags: [utilities, scrollable, overflow, scroll] keywords: [slds-scrollable, overflow, scroll, scrollable-x, scrollable-y] --- # Scrollable - Overflow Management Controlling scroll behavior in fixed-size containers. ## Core Classes | Class | Purpose | |-------|---------| | `slds-scrollable` | Enables scrolling on both axes when content exceeds container dimensions | | `slds-scrollable_x` | Enables horizontal scrolling only when content exceeds width | | `slds-scrollable_y` | Enables vertical scrolling only when content exceeds height | | `slds-scrollable_none` | Prevents scrolling and hides overflow content | ## Common Patterns ```html
Column 1 Column 2 Column 3 Column 4 Column 5 Column 6

Modal Title

Long form content that exceeds the modal height...
    Long code snippet that exceeds both width and height...
    Multiple lines of code...
    With very long lines that exceed the container width...
  
Content that might exceed the fixed height is clipped
``` ## Best Practices ✅ Use `slds-scrollable_x` for wide tables in responsive layouts ✅ Use `slds-scrollable_y` for long lists with fixed height containers ✅ Use `slds-scrollable` for code blocks or content that may overflow in both directions ✅ Set explicit height on containers using `slds-scrollable_y` ✅ Set explicit width on containers using `slds-scrollable_x` ✅ Include touch scrolling support for mobile devices (automatically included) ❌ Avoid nesting multiple scrollable containers ❌ Avoid using `slds-scrollable_none` on content users need to access ❌ Avoid scrollable areas without visual scroll indicators ❌ Avoid horizontal scrolling on mobile when vertical layout works better