Skip to content

Overflow

Use overflow utilities to control how content behaves when it exceeds the bounds of its container. In Flutter, the clip-family classes map to ClipRect/ClipRRect, while the scroll-family classes wrap content in a SingleChildScrollView.

Allow content to render outside the container boundary.

Style('overflow-visible ...', children: [
// ...
])

Clip content at the container boundary.

Style('overflow-hidden ...', children: [
// ...
])

Add a scrollbar only when content overflows.

Style('overflow-auto ...', children: [
// ...
])

Scroll horizontally only when content overflows the width.

Style('overflow-x-auto ...', children: [
// ...
])

Scroll vertically only when content overflows the height.

Style('overflow-y-auto ...', children: [
// ...
])

Always show a horizontal scrollbar.

Style('overflow-x-scroll ...', children: [
// ...
])

Always show a vertical scrollbar.

Style('overflow-y-scroll ...', children: [
// ...
])

Always show scrollbars on both axes.

Style('overflow-scroll ...', children: [
// ...
])
ClassFlutter equivalentDescription
overflow-hiddenClipRect / ClipRRectClip content on both axes
overflow-clipClipRect / ClipRRectClip content (same as hidden)
overflow-visibleno clipAllow content to paint outside bounds
overflow-autoSingleChildScrollView (both)Scroll on both axes when needed
overflow-scrollSingleChildScrollView (both) + Scrollbar(thumbVisibility: true)Always-visible scrollbars on both axes
overflow-x-autoSingleChildScrollView(horizontal)Horizontal scroll when needed
overflow-x-scrollSingleChildScrollView(horizontal) + Scrollbar(thumbVisibility: true)Always-visible horizontal scrollbar
overflow-x-hiddenClipRect / ClipRRectClip horizontal overflow
overflow-x-visibleno clipAllow horizontal overflow
overflow-y-autoSingleChildScrollView(vertical)Vertical scroll when needed
overflow-y-scrollSingleChildScrollView(vertical) + Scrollbar(thumbVisibility: true)Always-visible vertical scrollbar
overflow-y-hiddenClipRect / ClipRRectClip vertical overflow
overflow-y-visibleno clipAllow vertical overflow