Global Elements
2
Footer Header Services Strip Services Tabs
Components
36
Card Carousel Cards Grid Content Overlap Content Strip Cta Bar Featured Article Featured Blocks Featured Expert Featured Pods Featured Tabs Form Block Full Screen Carousel Full Width Content Heading Strip Hero Hero Featured Links List Location Tabs Logo Carousel Map Block People Grid Quote Block Reviews Carousel Reviews Tabs Service Tiles Services Strip Services Tabs Staggered Content Sticky Accordion Sticky List Sub Navigation Team Carousel Team Filters Team Strip Tile Carousel Tile Grid

Logo Carousel

Field
Field Type
Field Name
Instructions
Block Data
tab
Use Global Logos
true_false
use_global_logos
Logos
repeater
logos
-- Logo
image
logo
Block Meta
tab
ID
text
block_id
Block Classes
text
block_classes
Block Theme
select
block_theme
Background Colors
select
background_colors
Padding Top
select
padding_top
Padding Bottom
select
padding_bottom
Margin Top
select
margin_top
Margin Bottom
select
margin_bottom

				
@import "../../resources/scss/util/colours";
@import "../../resources/scss/util/variables";
@import "../../resources/scss/util/mixins";

.block-logo-carousel {
	border-top: 1px solid $lightBlue;
	border-bottom: 1px solid $lightBlue;
	padding-top: rem-calc(32);
	padding-bottom: rem-calc(32);

	&--custom{
		border-top: unset;
	}

	.swiper-wrapper {
		align-items: center;
	}

	.swiper-slide {
		img {
			display: block;
			margin: 0 auto;
			max-height: rem-calc(120);
			max-width: rem-calc(165);
			height: auto;
			width: auto;
		}
	}

	.swiper {
		padding-left: 0;
		padding-right: 0;
		position: relative;

		@include bp($md) {
			padding-left: rem-calc(100);
			padding-right: rem-calc(100);
		}

		&:before,
		&:after {
			content: '';
			position: absolute;
			top: rem-calc(-10);
			bottom: rem-calc(-10);
			width: rem-calc(140);
			z-index: 9;
			display: none;

			@include bp($md) {
				display: block;
			}
		}

		&:before {
			left: rem-calc(-10);
			background: rgb(255,255,255);
			background: linear-gradient(270deg, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 55%);
		}

		&:after {
			right: rem-calc(-10);
			background: rgb(255,255,255);
			background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 55%);
		}
	}
}
class logoCarousel {

	constructor() {
		this.blocks = document.querySelectorAll('.block-logo-carousel');
		this.init();
	}

	init() {
		this.blocks.forEach((block) => {
			const blockCarousel = block.querySelector(".swiper");
			const swiper = new Swiper(blockCarousel, {
				loop: true,
				slidesPerView: 2,
				autoplay: {
					delay: 1000,
					disableOnInteraction: false,
				},
				speed: 5000,
				breakpoints: {
					500: {
						slidesPerView: 3,
					},
					992: {
						slidesPerView: 5,
					}
				}
			});
		});
	}
}

new logoCarousel();

Animation / States

  • As the user scrolls to this component each logo will be lazyloaded and fade in one by one
  • The logo carousel will automatically cycle after a time period of 3 seconds

External Libraries

  • Swiper
  • ScrollTrigger (GSAP)

Notes (Design / Dev / SEO)

  • Within the global options there is the ability to select some logos to feature globally across the site. By default this component will dynamically pull these logos. However, the user can override which logos to feature