CaptionDescriptor
The object you use in image components for displaying captions when the image is full-screen.
Declaration
object CaptionDescriptorProperties
| Name | Type | Description |
|---|---|---|
text Required | string | The text to display in the caption, including any formatting tags or markup, depending on the format property. |
additions | [Addition] | An array of If you set format to |
format | string | The formatting or markup method applied to the text. If you set format to |
inlineTextStyles | [InlineTextStyle] | An array of Apple News Format ignores |
textStyle | (ComponentTextStyle | string) | An inline |
Mentioned in
Discussion
Use a CaptionDescriptor object to provide a caption or attribution for an image that’s displayed full screen. You can use a caption descriptor with a Figure, Portrait, or Photo component, and also with the individual items in a Gallery or Mosaic component.
You can use this object in Figure, Portrait, Photo, and Gallery Item.
Example
{
"components": [
{
"role": "gallery",
"items": [
{
"URL": "bundle://gallery-01.jpg",
"caption": "Thanks to the record drought, mountain lions have begun to descend from the peaks, sometimes into urban settings."
},
{
"URL": "bundle://gallery-02.jpg",
"caption": "Coyotes are also seen in cities more often."
},
{
"URL": "bundle://gallery-03.jpg",
"caption": {
"text": "<i>Steenbok</i> typically lie low in vegetation cover at the first sign of threat.",
"format": "html"
}
}
]
}
]
}