Skip to main content

Layout and scrolling

Keep a fixed heading above a bounded scroll area.

Before you start: Arrange a screen.

A scrolling axis is unbounded for its content. Give the viewport a finite size: here the root is h-60, and flex-1 allocates the remaining height to Scroll. Growth inside unbounded scroll content cannot create the viewport.

A bounded scroll area​

Only the rows scroll; the heading stays in place.

<Column class="p-4 gap-3 h-60">
<Text text="This heading stays in place" />
<Scroll class="flex-1">
<Column class="gap-2">
<For each="item" in="data.rows" key="item">
<Text bind-text="item" class="p-3 bg-card" />
</For>
</Column>
</Scroll>
</Column>
A bounded scroll area
editable
Browser preview
rReady to explore
Environment & events

Browser rendering of the shared document. Host services are bundled demo mocks. XML edits reset local state; data edits preserve compatible state.

Interact with the preview to inspect emitted events and mocked service calls.

Try it: Change h-60 to h-40. Add more data rows and verify the heading stays fixed.

Use List for keyed windowed data. Find sizing, flex, and spacing in Reference. See layout motion for explicit size changes.