Object

Gallery

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

Properties

items
(Required)

An array of the images that appear in the gallery. The order used in the array is the order of the images in the gallery. Gallery items can be JPEG (with .jpg or .jpeg extension), PNG, or GIF images.

role
string
(Required)

Always gallery for this component.

anchor

An object that defines vertical alignment with another component.

animation
*

An object that defines an animation to be applied to the component.

The none value is used for conditional design elements. Adding it here has no effect.

behavior
*

An object that defines behavior for a component, like Parallax or Springy.

The none value is used for conditional design elements. Adding it here has no effect.

conditional
*

An instance or array of component properties that can be applied conditionally, and the conditions that cause them to be applied.

The none value is used for conditional design elements. Adding it here has no effect.

hidden
boolean

A Boolean value that determines whether the component is hidden.

identifier
string

An optional unique identifier for this component. If used, this identifier must be unique across the entire document. You will 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 is defined at the top level of the document.

The none value is used for conditional design elements. Adding it here has no effect.

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. Users 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

See Also

Galleries and Mosaics

object Mosaic

The component for displaying a set of images as tiles in no particular order.

object GalleryItem

An object used in a gallery or mosaic component for displaying an individual image.