Carousel Sizing/Layout

Why do I have to set a specific frame height for Carousels? I can’t get them to fill the view without setting a specific height. It’s causing some of my images and text within each carousel to get cut off.

Hey @ghanbak, while this isn’t a bug per se, this is indeed something we’re looking at changing.

I’ll add your note here as a bump to get the devs to reconsider how this works.

For now though, yes Carousels that are in Scroll Containers are given a default height of 10, because this is the default height a Scroll Container in SwiftUI gives its children, because the height in a Scroll Container is effectively ∞

Just some context/background fyi.

Let me know if you have any further questions.

Cheers,
-Kevin

Thanks for responding so quickly. I figured out the problem. I had my Carousel in a scroll container. Just had to put a Vstack at the root and remove the scroll container. :slight_smile: