gallery-block 5.17.1-arc-themes-release-version-2.0.3.4718
Install from the command line:
Learn more about npm packages
$ npm install @wpmedia/gallery-block@5.17.1-arc-themes-release-version-2.0.3.4718
Install via package.json:
"@wpmedia/gallery-block": "5.17.1-arc-themes-release-version-2.0.3.4718"
About this version
The Gallery block shows a carousel with images and captions. It is used to display a collection of images. It imports the Themes Ads Block if that is available for Arc ads handling.
| Prop | Required | Type | Description |
| ------------------------------------- | ------------ | --------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | --- | -------------------------- | --- | ------- | ---------------- | --- | ---------------------------- | --- | ------- | ------------------ |
| customFields.inheritGlobalContent | no | Boolean | Determines whether or not the feature will use global content instead of the provided content config at the feature level. This is used by default. |
| customFields.galleryContentConfig | no | Fusion Content Config | Content config that will be used if inheritGlobalContent
is false. |
| customFields.lazyLoad | no | Boolean | Prevent the block from being rendered on the page until it is nearly in-view for the user |
| customFields.hideCredits | no | Boolean | Hide image credits | | customFields.hideTitle | no | Boolean | Hide image title | | customFields.hideCaption | no | Boolean | Hide image caption |
This is set in the blocks.json
.
Prop | Required | Type | Description |
---|---|---|---|
galleryCubeClicks | no | integer | If present sets the interval at which ads will be shown between gallery images. The click count do not take into account direction. |
-
globalContent.headlines.basic
(optional) -
globalContent.content_elements
(see below) for Engine Theme SDK Gallery component
_id: string;
url: string;
alt_text?: string;
subtitle?: string;
caption?: string;
credits?: {
by?: ImageAttribution[];
affiliation?: ImageAttribution[];
};
resized_params: {
[key: string]: string;
};
breakpoints: {
small: number;
medium: number;
large: number;
};
Phrase key | Default (English) |
---|---|
global.gallery-expand-button |
Expand |
global.gallery-autoplay-button |
Autoplay |
global.gallery-pause-autoplay-button |
Pause autoplay |
global.gallery-page-count-text |
%{current} of %{total} |
The following is a list of events that are emitted by this block.
Event Name | Description |
---|---|
galleryImageNext | The next image is viewed |
galleryImagePrevious | The previous image is viewed |
galleryExpandEnter | The full screen preview is activated |
galleryExpandExit | The full screen preview is de-activated |
galleryAutoplayStart | The autoplay mode starts |
galleryAutoplayStop | The autoplay mode stops |
If you want to listen to these events, the first thing is to import the EventEmitter object
into your code:
import { EventEmitter } from '@wpmedia/arc-themes-components'
Then create a callback function such as:
const myGalleryImageNext = (event) => {console.log('Here is the event: ', event);}
const myGalleryImagePrevious = (event) => {console.log('Here is the event: ', event);}
Then use you use your callback in subscribing to the event:
EventEmitter.subscribe('galleryImageNext', (event) => myGalleryImageNext(event));
EventEmitter.subscribe('galleryImagePrevious', (event) => myGalleryImagePrevious(event));
The event object for these events will contain the following information:
eventName (String): The event name fired.
ansGalleryId (String): The id of the gallery.
ansGalleryHeadline (String): The headline for the gallery.
ansImageId (String): The id for the current image.
caption (String): The caption for the current image.
orderPosition (Number): The position in the carousel for the current image.
totalImages (Number): Total number of images in the carousel.
autoplay (boolean): whether or not the event triggered during autoplay. Value is either true
or false
.
In case galleryCubeClicks
is used, an Ad of type 300x250
will be shown on all the cases.
Details
- gallery-block
- WPMedia
- over 1 year ago
- CC-BY-NC-ND-4.0
- 2 dependencies
Assets
- gallery-block-5.17.1-arc-themes-release-version-2.0.3.4718.tgz
Download activity
- Total downloads 103
- Last 30 days 0
- Last week 0
- Today 0
Recent versions
View all- 5.17.1-arc-themes-release-version-1.33.3561
- 5.17.1-arc-themes-release-version-2.3.1.4873
- 5.17.1-arc-themes-release-version-2.3.0.4885
- 5.17.1-arc-themes-release-version-2.1.3.4772
- 5.17.1-arc-themes-release-version-2.1.3.4756
- 5.17.1-arc-themes-release-version-2.1.2.4756
- 5.17.1-arc-themes-release-version-2.0.3.4722
- 5.17.1-arc-themes-release-version-2.0.3.4721
- 5.17.1-arc-themes-release-version-2.0.3.4718
- 5.17.1-arc-themes-release-version-2.0.3.4707