Skip to main content
Empty(): Component;
Empty takes no parameters. It produces a component that renders nothing and occupies no space.

Support

Usage

Conditional rendering

Use Empty as the else-branch when conditionally showing content:
showContent ? Text("Hello") : Empty()

Placeholder in layouts

VStack([
    Text("Title"),
    showSubtitle ? Text("Subtitle") : Empty()
])