View Source LazyVStack

<LazyVStack>

Vertical stack that creates Views lazily.

Overview

Lazy stacks behave similar to their non-lazy counterparts. Use the pinnedViews attribute to pin section headers/footers when contained in a ScrollView.

<ScrollView axes="vertical">
    <LazyVStack>
        <%= for i <- 1..50 do %>
            <Text id={i |> Integer.to_string} font="largeTitle"><%= i %></Text>
        <% end %>
    </LazyVStack>
</ScrollView>

Attributes

References

The horizontal alignment of views within the stack. Defaults to center-aligned.

Discussion

See VerticalAlignment.

Pins section headers/footers.

Discussion

See PinnedScrollableViews.

The spacing between views in the stack. If not provided, the stack uses the system spacing.