Contents

DocumentStyle

The object for setting the background color for your article.

Declaration

object DocumentStyle

Properties

NameTypeDescription
backgroundColorColor

The article’s background color. The value defaults to white.

conditional(ConditionalDocumentStyle | [ConditionalDocumentStyle])

An instance or array of document style properties that you can apply conditionally, and the conditions that cause Apple News to apply them.

Mentioned in

Discussion

Use the DocumentStyle object to set the background color for the entire article.

You can use this object in ArticleDocument.

Example

{
  "documentStyle": {
    "backgroundColor": "#F7F7F7"
  },
  "components": [
    {
      "role": "title",
      "text": "Apple News Format"
    },
    {
      "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."
    },
    {
      "role": "photo",
      "URL": "bundle://image.jpg"
    }
  ]
}

See Also

Styles