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

# ArticleDocument.componentStyles

An object containing component style objects that components in the article can refer to.

```
object ArticleDocument.componentStyles
```

## Discussion

`ArticleDocument.componentStyles` is an object containing the component style objects that components in your article can use. You provide each component style object as a key-value pair. In each pair, you create a key that’s meaningful to you. The value of each pair is a [`ComponentStyle`](/documentation/AppleNewsFormat/ComponentStyle) object.

### Example

```json
{
  "title": "Article Title",
  "identifier": "sample",
  "version": "1.8",
  "language": "en",
  "layout": {
    "columns": 20,
    "width": 1024,
    "margin": 60,
    "gutter": 20
  },
  "documentStyle": {
    "backgroundColor": "#FFFFFF"
  },
  "components": [
    {
      "role": "section",
      "style": "exampleStyle",
      "components": [
        {
          "role": "body",
          "text": "Apple News Format allows publishers to craft beautiful editorial layouts. Galleries, audio, video, and fun interactions like animation make stories spring to life.",
          "layout": {
            "margin": {
              "top": 10,
              "bottom": 10
            }
          }
        }
      ]
    }
  ],
  "componentTextStyles": {},
  "textStyles": {},
  "componentStyles": {
    "exampleStyle": {
      "backgroundColor": "#FFFFFF",
      "opacity": 1,
      "border": {
        "all": {
          "width": 1,
          "color": "black"
        },
        "left": false,
        "right": false
      }
    }
  },
  "componentLayouts": {}
}
```

---

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)