Photo Caption
The Alexa photo caption responsive component (AlexaPhotoCaption
) displays text to provide context to an image. For example, the Alexa photo (AlexaPhoto
) responsive template uses AlexaPhotoCaption
to display text with an image.
Compatibility
AlexaPhotoCaption
is designed to work with the following viewport profiles:
- The following widget viewport profiles in the
alexa-viewport-profiles
package:- Widget Medium (
@hubWidgetMedium
)
- Widget Medium (
- All standard viewport profiles in the
alexa-viewport-profiles
package:- All hub round profiles
- All hub landscape profiles
- All hub portrait profiles
- All mobile profiles
- All TV profiles
For details about viewport profiles, see Viewport Profiles.
If you use AlexaPhotoCaption
on an unsupported viewport, you might have unexpected results.
Import the alexa-layouts package
To use AlexaPhotoCaption
, import the alexa-layouts package.
The latest version of the alexa-layouts
package is 1.7.0. AlexaPhotoCaption
was introduced in version 1.5.0.
AlexaPhotoCaption parameters
The following table shows the parameters you can set on AlexaPhotoCaption
. Unless otherwise noted, standard viewport profiles support all parameters. The "Widget support" column indicates the widget viewport profiles that support each parameter. For details about viewport profiles, see Viewport Profiles.
All parameters except type
are optional.
Name | Type | Default | Description | Widget support | Version added |
---|---|---|---|---|---|
|
String |
|
Specifies the layout direction for the content. Set this property to either |
Medium |
1.5.0 |
|
String |
— |
Primary text for the caption, displayed in a single line. |
Medium |
1.5.0 |
|
String |
— |
Secondary text for the caption, displayed in a single line below the |
Medium |
1.5.0 |
|
String |
— |
Always set to |
Medium |
1.5.0 |
AlexaPhotoCaption example
Related topics
Last updated: Dec 06, 2023