Spacer
function Spacer(__namedParameters): Element;Flexible spacer that pushes siblings apart.
Renders an invisible Box with flexGrow. Drop it between elements
in a row or column to push them to opposite edges, or use multiple
spacers to distribute space evenly.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
__namedParameters | SpacerProps |
Returns
Section titled “Returns”Element
Example
Section titled “Example”// Push "Save" to the right edge<Box style={{ flexDirection: "row" }}> <Text>Title</Text> <Spacer /> <Button label="Save" onPress={save} /></Box>Properties
Section titled “Properties”| Property | Type | Description |
|---|---|---|
size? | number | Flex grow factor. Default 1. Set higher values to take proportionally more space. |