columnsbannerHeight{
"name": "BannerCarousel",
"view": "Default",
"section": "SectionA",
"settings": {
"bannerExtended": true,
"bannerHeight": "Standard",
"columns": "One",
"banners": [
{
"backgroundImage": {
"id": "Image Id",
"galleryId": "Gallery Id",
"link": "https://example.com/sample",
"mediaType": "Image"
},
"backgroundImageMobile": {
"id": "Mobile image Id",
"galleryId": "Mobile gallery Id",
"link": "https://example.com/sample",
"mediaType": "Image"
},
"sets": [
{
"backgroundColor": true,
"alignment": "Left",
"header": "Sample header",
"text": "<p>Sample text</p>\n",
"buttonText": "Sample button text",
"buttonLink": "/sample"
},
...
]
},
...
],
"id": "Component Id",
"section": "SectionA",
"type": "NoirBannerCarousel",
"name": "BannerCarousel",
"configuredInContentApi": true,
"view": "Default",
"displayName": "Sample display name",
"cssClass": "Sample cssClass"
},
"translations": {
"clickToLearnMoreAbout": "Sample translation",
"bannerLink": "Sample translation",
"...": "..."
}
}settings.idcomp-{{ id }}banner-carousel-{{ id }}settings.banners[]banners.length > 0.settings.cssClass(UNDEFINED).settings.bannerExtended (boolean)true renders full width; otherwise it uses container.settings.columns (string)OneTwo, Three, Four, TwoThirdOneThird, OneThirdTwoThird.settings.bannerHeight (string)StandardSmall, FullHeight.x-data="bannercarouseldefault.initComponent('{{ id }}', '{{ columns }}')"initComponent(...) returns the Alpine component state + methods and then boots Swiper.initComponent(id, columns)id: component instance id (used to target #banner-carousel-<id>)columns: layout mode (e.g. One, Two, Three, etc.)id, columnsnavbarHeight, topbarHeightbannersHeight (calculated height for FullHeight behaviors)isMobile (computed with breakpoint < 1440)init()getBannersHeight()updateNavbarHeight()updateTopbarHeight()swiperInit(id, columns)id and columns as strings (as the Liquid call passes strings)..navbar and .topbar being present (see the height helpers below).init()getBannersHeight() once on load.window.resize listener that:isMobile (window.innerWidth < 1440)getBannersHeight() againthis.swiperInit(this.id, this.columns)setTimeout(…, 500) with requestAnimationFrame loops, orgetBannersHeight()bannersHeight differently for desktop vs mobile:!isMobile):window.innerHeightupdateTopbarHeight()updateNavbarHeight()bannersHeight = vh - topbarHeight - navbarHeightisMobile):bannersHeight = "auto".topbar and .navbar exist when FullHeight is enabled; otherwise heights become 0 and banners may overlap with the header.isMobile breakpoint (1440) to match the design system.updateNavbarHeight()document.querySelector(".navbar")this.navbarHeight = navbar.offsetHeight.navbar class.updateTopbarHeight()document.querySelector(".topbar")this.topbarHeight = topbar.offsetHeightswiperInit(id, columns)Swiper instance on #banner-carousel-<id> with rules based on columns and on a “Small height” mode.spaceBetween = 24slidesPerViewMobile = 1slidesPerViewDesktop = 1columns:Two → desktop slidesPerView = 2Three → desktop slidesPerView = 3Four → desktop slidesPerView = 4TwoThirdOneThird / OneThirdTwoThird → desktop slidesPerView = 2One) → spaceBetween = 0 and desktop slidesPerView = 1#banner-carousel-<id>.swiper-pagination-<id>.carousel-wrap has class heightSmall.swiper-slideminSlidesNeeded = max(slidesPerViewMobile, slidesPerViewDesktop)slides.length > minSlidesNeedednew Swiper(carousel, { ... })loop: enableLoopspeed: 600autoHeight: trueobserver: true, observeParents: true (helps when parent layout changes)slidesPerView = 1spaceBetween = hasSmallHeight ? 24 : 0rows: hasSmallHeight ? 2 : 11024):slidesPerView = slidesPerViewDesktopspaceBetween = spaceBetweengrid: falsenew Swiper(...)).observer: true helps but may not be enough; you may need to destroy/reinit Swiper for correctness.spaceBetween for the default case as 0, while “small height” uses 24 for mobile. Keep this intentional: small-height mode is effectively a 2-row grid and needs spacing..topbar and .navbar being present; if those class names change, height calculation may become inaccurate.{}) by design.