Skip to main content

Banner

HTML or image banner

Overview

The banner renders content that fills its container and will display any terms for the corresponding promotional content, and a clickable bonus code .

Untitled

// custom defined tag
<bam-banner
property-id="1"
placement-id="1"
context="context">
</bam-banner>

Image Banner (deprecated)

If needed you can render an image based banner by including this attribute in the tag:

image-banner="true” . This tells the snippet to use the older image based version of the banner. Make sure you have confirmed that images have been loaded for this placement otherwise the banner will not work as intended.

Banner2

The banner renders one of two images, depending on the width of its parent container. It will change images at 800px . The image is optimally served with a srcSet, so the full size will not be requested at smaller screen sizes. If multiple promotions are returned, the banner will rotate through promotions by default. Pass the prop rotate="false" to prevent this behavior.

Below 800px - dimensions 1000px x 400px or 2.5:1 aspect ratio

Above 800px - dimensions 3200px x 280px or 11.4:1 aspect ratio

SSR AvailableThis component is available for server side rendering.

Properties

PropertyAttributeDescriptionTypeDefault
ageagenumberundefined
callback--You cannot pass this parameter via an attribute. You must set the callback function after the DOM has loaded.() => voidthis.defaultCallback
contextcontext(required)stringundefined
ctaTypecta-typestringundefined
deferdeferbooleanundefined
devModedev-modebooleanfalse
deviceTypedevice-type"android" | "desktop" | "ios" | "mobile"undefined
gameIdgame-idnumberundefined
hideUnderagehide-underagebooleanfalse
imageBannerimage-bannerbooleanfalse
isBetsyncUseris-betsync-userbooleanundefined
isLoggedInis-logged-inbooleanundefined
isMobileis-mobilebooleanundefined
leagueleaguestringundefined
locationlocationstringundefined
pageSlugpage-slugstringundefined
placementIdplacement-id(required)numberundefined
propertyIdproperty-id(required)numberundefined
rotaterotatebooleantrue
rotateTimerotate-timenumberDEFAULT_ROTATE_TIME
sponsorSlugsponsor-slugstringundefined
subdivisionsubdivisionnumberundefined
subscriptionTiersubscription-tier0 | 1 | 2 | 3undefined
termsterms"affiliate" | "geo"'geo'
userParentBookIdsuser-parent-book-idsstringundefined
wasProwas-probooleanundefined