Margin
The object for defining the space above and below a component.
Declaration
object MarginProperties
| Name | Type | Description |
|---|---|---|
bottom | (SupportedUnits | number) | The bottom margin in |
top | (SupportedUnits | number) | The top margin in |
Mentioned in
Discussion
Use the margin object to specify top and bottom margins to designate space above and below a component. For information on the units, see Specifying Measurements for Components.
You can use this object in ComponentLayout and AutoPlacementLayout.
Example
{
"components": [
{
"role": "header",
"layout": "headerLayout",
"components": [
{
"role": "title",
"text": "Article Title"
}
]
}
],
"componentLayouts": {
"headerLayout": {
"margin": {
"top": 50,
"bottom": 50
}
}
}
}