Aside
The component for setting apart content that is not directly related to the article, such as promotional content.
Declaration
object AsideProperties
| Name | Type | Description |
|---|---|---|
role Required | string | Always |
additions | [ComponentLink] | An array of You can add a link to a Container component to make the entire component tappable. Any links used in its child components are not interactable. |
allowAutoplacedAds | boolean | A Boolean value that allows the placement of ad banners between components. Nested components inherit the value of the outermost container that explicitly sets |
anchor | Anchor | 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 |
behavior | (Behavior | string("none")) | An object that defines behavior for a component, like Parallax or Springy. The |
components | [Component] | An array of components to display as child components. Child components are positioned and rendered relative to their parent component. |
conditional | (ConditionalContainer | [ConditionalContainer]) | An instance or array of container properties that can be applied conditionally, and the conditions that cause Apple News Format to apply them. |
contentDisplay | (CollectionDisplay | HorizontalStackDisplay | string("none")) | An object that defines how to position child components within this In versions of News prior to iOS 11, child components are positioned as if The |
hidden | boolean | A Boolean value that determines whether the component is hidden. |
identifier | string | An optional unique identifier for this component. If used, this |
layout | (ComponentLayout | string) | An inline If |
style | (ComponentStyle | string | string("none")) | An inline The |
Mentioned in
Discussion
Use an aside component to hold information not directly related to your article. Use an aside to help Siri make the most informed content recommendations to people using Apple News and to provide better accuracy for placing your content within feeds, such as the Today feed, channel feeds, and topic feeds.
When News recommends content, it ignores any content in the aside component, so you can put content there that is not directly related to the article, such as promotional content, links to other articles, or author biographies.
Example
{
"components": [
{
"role": "aside",
"components": [
{
"role": "body",
"text": "<a href=\"https://www.apple.com/newsroom/2017/06/swift-playgrounds-expands-coding-education-to-robots-drones-and-musical-instruments/\">Swift Playgrounds expands coding education to robots, drones and musical instruments</a>",
"format": "html"
}
]
}
]
}