Spacer
A flexible space that expands along the major axis of its containing stack layout.
info
Spacers are only meant to be used within a stack layout.
Example​
- swiftui-react-native
- SwiftUI
- React Native
<HStack>
<Text>Hello</Text>
<Spacer />
<Text>World</Text>
</HStack>
HStack {
Text("Hello")
Spacer()
Text("World")
}
<View
style={{
flexDirection: 'row',
justifyContent: 'space-between',
width: '100%',
}}
>
<Text>Hello</Text>
<Text>World</Text>
</View>