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

# ArticleDocument.textStyles

An object containing text style objects that components within this document can refer to inline in text.

```
object ArticleDocument.textStyles
```

## Discussion

`Article Document.textStyles` is an object containing the text style objects that components in your article can refer to inline from their text, using HTML or Markdown. See <doc://com.apple.applenews/documentation/AppleNews/using-html-with-apple-news-format> and <doc://com.apple.applenews/documentation/AppleNews/using-markdown-with-apple-news-format>. You can also refer to these text style objects in an [`InlineTextStyle`](/documentation/AppleNewsFormat/InlineTextStyle) object within a component.

You provide each component layout 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 [`TextStyle`](/documentation/AppleNewsFormat/TextStyle) object.

### Example

```json
{
  "title": "Article Title",
  "identifier": "sample",
  "version": "1.8",
  "language": "en",
  "layout": {
    "columns": 20,
    "width": 1024,
    "margin": 60,
    "gutter": 20
  },
  "documentStyle": {
    "backgroundColor": "#FFF"
  },
  "components": [
    {
      "role": "section",
      "components": [
        {
          "role": "body",
          "format": "html",
          "text": "<span data-anf-textstyle='exampleStyle'>There is a moment in every dawn</span> when light floats, there is the possibility of magic. Creation holds its breath."
        }
      ]
    }
  ],
  "componentTextStyles": {},
  "textStyles": {
    "exampleStyle": {
      "fontFamily": "Gill Sans",
      "fontWeight": "bolder",
      "textColor": "#333333",
      "fontSize": 18,
      "textShadow": {
        "radius": 20,
        "opacity": 0.3,
        "color": "#99999930",
        "offset": {
          "x": -10,
          "y": 5
        }
      },
      "stroke": {
        "color": "#FFC800",
        "width": 1
      }
    }
  },
  "componentStyles": {},
  "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)