View Source LazyHStack

<LazyHStack>

Horizontal 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="horizontal">
    <LazyHStack>
        <%= for i <- 1..50 do %>
            <Text id={i |> Integer.to_string} font="largeTitle"><%= i %></Text>
        <% end %>
    </LazyHStack>
</ScrollView>

Attributes

References

The vertical 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.