Summary: Documentation for absolute/relative layout Reviewed By: emilsjolander Differential Revision: D6998594 fbshipit-source-id: 25dacbb87e067ab8abd555fd24611776b0332047
24 lines
825 B
Markdown
24 lines
825 B
Markdown
---
|
|
path: "docs/absolute-relative-layout"
|
|
title: "Absolute/Relative Layout"
|
|
hasPlayground: true
|
|
---
|
|
## Absolute/Relative Layout
|
|
|
|
### Relative Layout
|
|
|
|
The element is positioned according to the normal flow of the view, and then offset relative to itself based on the values of `top`, `right`, `bottom`, and `left`. The offset does not affect the position of any other elements. Try out relative layout by changing the `positionType` of any child view and try to add offset to it.
|
|
|
|
### Absolute Layout
|
|
|
|
The element doesn't take part in the normal flow. It is laid out independent of its siblings. The position is determined based on the `top`, `right`, `bottom` and `left` values. Try this out in playground.
|
|
|
|
|
|
#### Position Type
|
|
|
|
<controls prop="positionType"></controls>
|
|
|
|
#### Position
|
|
|
|
<controls prop="position"></controls>
|