Duel gallery settings

Content settings

id: Gallery id to fetch the assets from

or

product: Combination of the client’s short id and the product sku

displayMin: How many entries should the gallery at least have in order to be rendered?

sort: How should the content be sorted by default?

sortDisplay: Which sort controls should be displayed?

Color settings

color: Foreground/text color of the gallery

bgColor: Background color of the gallery

thumbColor: Foreground/text color of the thumbnail when hovering over

thumbBgColor: Background color of the thumbnail when hovering over

Layout Settings

layoutStyle: Changes the basic layout of the gallery to a grid, carousel or list. If supplied as an array, all styles get evaluated in order and the first one where all conditions are met (if there are any), wins.

layoutRules: Specify how many rows/columns the gallery should have based on CSS media queries. You can specify a set of rules for each gallery style individually.

For more information on the format of layoutStyle and layoutRules, have a look at the Typescript interfaces at the end of the document.

columns: Changes how many columns the gallery has. Has no effect if layoutStyle is ‘list’.

rows: Changes how many rows the gallery has. Has no effect if layoutStyle is ‘carousel’.

Display Settings

hideAttributions: Hide or show the display name (entry submitter’s name) when hovering over the asset and inside the modal

hideDates: Hide or show the entry submission date when hovering over the asset and inside the modal

testimonialPreview: Preview the testimonial when hovering over the asset

ratingPreview: Preview the rating when hovering over the asset

Advanced Settings

container: Specify the container that the gallery should be appended to

Typescript Interfaces

enum LayoutStyle {
 Grid = 'grid',
 Carousel = 'carousel',
 List = 'list',
}

interface LayoutStyleRule {
 type: LayoutStyle;
 displayMin?: number;
 displayMax?: number;
 mediaQuery?: string;
}

interface LayoutRule {
 rows?: number;
 columns?: number;
 mediaQuery?: string;
}

interface LayoutRules {
 grid?: LayoutRule[];
 carousel?: LayoutRule[];
 list?: LayoutRule[];
}