Component
Properties shared by all component types.
Declaration
object ComponentProperties
| Name | Type | Description |
|---|---|---|
role Required | string | The The value of the A For a list of valid component types, see Components. |
anchor | Anchor | An object that defines vertical alignment with another component. |
animation | (ComponentAnimation | string("none")) | An object that defines an animation the component applies. Use the |
behavior | (Behavior | string("none")) | An object that defines behavior for a component, like Parallax or Springy. Use the |
conditional | (ConditionalComponent | [ConditionalComponent]) | An instance or array of component properties that you can apply conditionally, and the conditions that cause Apple News Format to apply them. |
hidden | boolean | A Boolean value that determines whether the component is hidden. |
identifier | string | A unique identifier for this component. If you use |
layout | (ComponentLayout | string) | An inline If you don’t define |
style | (ComponentStyle | string | string("none")) | An inline Use the |
Discussion
In Apple News Format, every component has a property named role that conveys the component’s semantic value and its function in the article. For example, a role property that has a value of body indicates a body component, which means that its content is part of the article’s body text. A component whose role property has a value of photo represents one of the images in the article.
You can use this object in ArticleDocument and Container.