Contents

ArticleTitle

The component for displaying an article title in the ArticleLink component.

Declaration

object ArticleTitle

Properties

NameTypeDescription
role Requiredstring

Always article_title for this object.

additions[Addition]

Ignored for all children of ArticleLink.

anchorAnchor

An object that defines vertical alignment with another component.

animation(ComponentAnimation | string("none"))

An object that defines an animation you apply to the component.

Use the none value for conditional design elements. Adding it here has no effect.

behavior(Behavior | string("none"))

An object that defines behavior for a component, like Parallax or Springy.

The none value is used for conditional design elements. Adding it here has no effect.

conditional(ConditionalText | [ConditionalText])

An instance or array of text properties that can be applied conditionally, and the conditions that cause Apple News Format to apply them.

formatstring

The formatting or markup method applied to the text.

Valid values:

Inline styling and additions with ranges (using inlineTextStyles and additions properties) are only supported when format is none.

hiddenboolean

A Boolean value that determines whether the component is hidden.

identifierstring

A unique identifier for this component. If used, the identifier must be unique across the entire document. An identifier is required if you want to anchor other components to this component. See Anchor.

inlineTextStyles([InlineTextStyle] | string("none"))

An array of InlineTextStyle objects you can use to apply different text styles to ranges of text. For each InlineTextStyle object, supply rangeStart and rangeLength values, and either a TextStyle object or the identifier of a text style that is defined at the top level of the document.

Inline text styles are ignored when the format is set to markdown or html.

The none value is used for conditional design elements. Adding it here has no effect.

layout(ComponentLayout | string)

Either an inline ComponentLayout object that contains layout information, or a string reference to a ComponentLayout object that is defined at the top level of the document.

If layout is not defined, size and position are based on various factors, such as the device type, the length of the content, and the role of this component.

style(ComponentStyle | string | string("none"))

An inline ComponentStyle object that defines the appearance of this component, or a string reference to a ComponentStyle object that is defined at the top level of the document.

The none value is used for conditional design elements. Adding it here has no effect.

textstring

The text, styled according to the textStyle definition. You can also use a subset of HTML syntax by setting format to html. See Using HTML with Apple News Format.

textStyle(ComponentTextStyle | string)

An inline ComponentTextStyle object that contains styling information, or a string reference to a ComponentTextStyle object that is defined at the top level of the document.

Mentioned in

Discussion

Use the ArticleTitle object to display the title of the linked article. ArticleTitle is used in combination with the ArticleLink component and is used by VoiceOver for iOS and VoiceOver for macOS to make content more accessible.

Example

{
  "components": [
    {
      "role": "article_link",
      "articleIdentifier": "https://apple.news/AT6kNQslCQy6EE4bF8hpOoQ",
      "components": [
        {
          "role": "article_thumbnail",
          "aspectRatio": 1,
          "fillMode": "cover",
          "verticalAlignment": "top"
        },
        {
          "role": "article_title"
        }
      ]
    }
  ]
}

See Also

Article Structure