---
title: Gallery
framework: applenewsformat
role: symbol
role_heading: Object
path: applenewsformat/gallery
---

# Gallery

The component for displaying a sequence of images in a specific order as a horizontal strip.

## Declaration

```data
object Gallery
```

## Properties

items: An array of the images that appear in the gallery. The order you use in the array is the order of the images in the gallery. Gallery items can be JPEG (with .jpg or .jpeg extension), WebP, PNG, or GIF images. If the GIF is animated, the animation plays only in full screen. note: If you add an animated WebP image, Apple News removes the animation from the WebP image. role: Always gallery for this component. anchor: An object that defines vertical alignment with another component. animation: An object that defines an animation you apply to the component. Use the none value for conditional design elements. Adding it here has no effect. behavior: An object that defines behavior for a component, like Parallax or Springy. Use the none value for conditional design elements. Adding it here has no effect. conditional: An instance or array of component properties that you can apply conditionally, and the conditions that cause Apple News Format to apply them. hidden: A Boolean value that determines whether the component is hidden. identifier: An optional unique identifier for this component. If you use identifier, it must be unique across the entire document. You  need an identifier for your component if you want to anchor other components to it. layout: An inline ComponentLayout object that contains layout information, or a string reference to a ComponentLayout object that is defined at the top level of the document. If layout is not defined, size and position will be based on various factors, such as the device type, the length of the content, and the role of this component. style: An inline ComponentStyle object that defines the appearance of this component, or a string reference to a ComponentStyle object that you define at the top level of the document. Use the none value for conditional design elements. Adding it here has no effect.

## Mentioned in

Preparing Image, Video, Audio, Music, and ARKit Assets

## Discussion

Discussion Use the Gallery component for sequences of images where the ordering of the items is important to the story. To display images in no specific order, use the Mosaic component. People can swipe to view the images in a gallery as shown in this example:

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         }       ]     }   ] }

## Relationships

### Inherits From

- [Component](applenewsformat/component.md)

## See Also

### Related Documentation

- [Adding a Gallery of Images](applenews/adding-a-gallery-of-images.md)

### Galleries and Mosaics

- [Mosaic](applenewsformat/mosaic.md)
- [GalleryItem](applenewsformat/galleryitem.md)
