Contents

Byline

The component for adding the publication date or contributor credits, especially for articles with multiple contributors.

Declaration

object Byline

Properties

NameTypeDescription
role Requiredstring

Always byline for this component.

text Requiredstring

The text to display in the article, including any formatting tags depending on the format property.

You can also use a subset of HTML tags or Markdown syntax by setting format to html or markdown, respectively. See Using HTML with Apple News Format. Alternatively, you can style ranges of text individually using the InlineTextStyle object.

additions[Addition]

An array of all the additions that you apply to ranges of the component’s text.

If you set format to html or markdown, Apple News Format doesnʼt support Additions or InlineTextStyles.

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.

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

conditional(ConditionalText | [ConditionalText])

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

formatstring

The formatting or markup method applied to the text.

If you set format to html or markdown, Apple News Format doesn’t support Additions or InlineTextStyles.

hiddenboolean

A Boolean value that determines whether the component is hidden.

identifierstring

An optional unique identifier for this component. If you use identifier, it must be unique across the entire document. You need an identifier for your component if you want to anchor other components to it.

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

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

Apple News Format ignores inline text styles when format is set to markdown or html.

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

layout(ComponentLayout | string)

An inline ComponentLayout object that contains layout information, or a string reference to a ComponentLayout object that you define at the top level of the document.

If you don’t define layout, 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 you define at the top level of the document.

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

textStyle(ComponentTextStyle | string)

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

Mentioned in

Discussion

Use a Byline component to include the date and time of publication, specifying your local timezone, or to indicate more than one contributor to the article. A byline could include the word “by” or “from” as well as the contributors’ names as text. Components are also available for Illustrator, Photographer, and Author attributions.

Example

{
  "components": [
    {
      "role": "byline",
      "text": "by MICHAEL BURNS | October 25, 2015 | 11:15 AM",
      "layout": {
        "columnStart": 0,
        "columnSpan": 7,
        "margin": {
          "top": 20,
          "bottom": 10
        }
      }
    }
  ]
}

See Also

Text