Skip to main content

Spacer

Usage

Awesome UI
Blossom UI
function SpacerUsage() {
return (
<View>
<Text>Awesome UI</Text>
<Spacer height={20} />
<Text>Blossom UI</Text>
</View>
)
}

Vertical

Hello
World
function SpacerVertical() {
return (
<View row>
<Text>Hello</Text>
<Spacer width={100} height={50} />
<Text>World</Text>
</View>
)
}

On Background

Awesome UI
Blossom UI
function SpacerOnBackground() {
return (
<View style={{backgroundColor: 'gray'}}>
<Text>Awesome UI</Text>
<Spacer height={20} />
<Text>Blossom UI</Text>
</View>
)
}

Props

PropData TypeDefault ValueDescription
ExtendsViewProps$1--Inherits properties from ViewProps$1
widthnumber--Width of the spacer
heightnumber--Height of the spacer