GalleryItem
An object used in a gallery or mosaic component for displaying an individual image.
Declaration
object GalleryItemProperties
| Name | Type | Description |
|---|---|---|
URL Required | uri | The Image URLs can begin with Encode image filenames as |
accessibilityCaption | string | A caption that describes the image. The text is used for VoiceOver. For more information about VoiceOver, see the Vision page in Accessibility. If you don’t provide |
caption | (CaptionDescriptor | string) | A caption that describes the image. The article displays this text when the image is full screen, and VoiceOver uses this text if you don’t provide |
explicitContent | boolean | A Boolean value that indicates the image may contain explicit content. |
Mentioned in
Discussion
Use an array of GalleryItem objects to define the individual items used in a gallery or mosaic component. When the user taps an image in a gallery or mosaic to see it full-screen (as shown in the following figure), the caption from the caption descriptor property is shown. Note that this is different from the Caption component.
[Image]
This object can be used in Gallery and Mosaic.
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",
"explicitContent": true
}
]
}
]
}