<!--
{
  "availability" : [
    "Apple News Format: 1.7.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppleNewsFormat",
  "identifier" : "/documentation/AppleNewsFormat/Margin",
  "metadataVersion" : "0.1.0",
  "role" : "Object",
  "symbol" : {
    "kind" : "Object",
    "modules" : [
      "Apple News Format"
    ],
    "preciseIdentifier" : "data:news_format:Margin"
  },
  "title" : "Margin"
}
-->

# Margin

The object for defining the space above and below a component.

```
object Margin
```

## 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 <doc://com.apple.applenews/documentation/AppleNews/specifying-measurements-for-components>.

You can use this object in [`ComponentLayout`](/documentation/AppleNewsFormat/ComponentLayout) and [`AutoPlacementLayout`](/documentation/AppleNewsFormat/AutoPlacementLayout).

### Example

```json
{
  "components": [
    {
      "role": "header",
      "layout": "headerLayout",
      "components": [
        {
          "role": "title",
          "text": "Article Title"
        }
      ]
    }
  ],
  "componentLayouts": {
    "headerLayout": {
      "margin": {
        "top": 50,
        "bottom": 50
      }
    }
  }
}
```

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)