Divider
The component for defining a horizontal line to visually divide parts of your article.
Declaration
object DividerProperties
| Name | Type | Description |
|---|---|---|
role Required | string | Always |
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 |
conditional | (ConditionalDivider | [ConditionalDivider]) | An instance or array of component properties that can be applied 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 | An optional unique identifier for this component. If used, this |
layout | (ComponentLayout | string) | An inline If |
stroke | (StrokeStyle | string("none")) | The stroke properties to apply to the horizontal line. The |
style | (ComponentStyle | string | string("none")) | An inline The |
Mentioned in
Discussion
A divider component appears as a horizontal line to create a visual division. The divider component can be used to separate title components and section components, and so on.
Example
{
"components": [
{
"role": "heading1",
"text": "Heading"
},
{
"role": "divider",
"stroke": {
"width": 3,
"color": "#D5B327"
}
}
]
}