Skip to content

Overflow

Control content overflow behavior

Syntax

layout="overflow:[value]"

Values

ValueCSS OutputDescription
autooverflow: autoScrollbar when needed
hiddenoverflow: hiddenHide overflow
visibleoverflow: visibleShow overflow
scrolloverflow: scrollAlways show scrollbar
clipoverflow: clipClip overflow

Examples

html
<div layout="overflow:hidden">Clipped content</div>
<div layout="overflow:auto">Scrollable</div>

Preview

Overflow Hidden

layout="overflow:hidden" - Content clipped at container edge

This is a long text that will be clipped because overflow is hidden.

View Code
html
<div layout="overflow:hidden" space="p:small" visual="bg:neutral-100 dark:bg:neutral-900 rounded:medium" style="height: 60px; width: 150px;">
  <p visual="text:neutral-800 dark:text:neutral-200">This is a long text that will be clipped because overflow is hidden.</p>
</div>

Overflow Auto

layout="overflow:auto" - Scrollbar appears when content overflows

This is a long text that will show a scrollbar because overflow is auto.

View Code
html
<div layout="overflow:auto" space="p:small" visual="bg:neutral-100 dark:bg:neutral-900 rounded:medium" style="height: 60px; width: 150px;">
  <p visual="text:neutral-800 dark:text:neutral-200">This is a long text that will show a scrollbar because overflow is auto.</p>
</div>