Components
53
Accordion Items Animated Gallery Basic Hero Basic Map Case Studies Feed Case Studies Hero Case Study Hero Case Study Slider Column Content Content Grid Content Image Content Slider Cta Cta Blocks Embed Block Enriched Accordion Error Event Feed Example Features Slider Full Width Image Hero Full Width Media Image And Form Image Content Image Split Content Image Stats Logo Slider Map Post Feed Pricing Publications Feed Simple Accordion Simple Header Simple Hero Solutions Animated Block Split Content Split Content Carousel Split Content Content Split Content Post Split Content Pricing Split Content Video Split Image Hero Stats Slider Team Carousel Team Hero Team Listing Testimonial Case Study Timeline Trivia Bar Two Column Rich Text Vacancies Table Video Video Expand

Features Slider

View example

Living by our values:

cytonn-photography-n95VMLxqM2I-unsplash

Collaboration

Collaboration

We share knowledge for mutual benefit

pexels-alexander-suhorucov-6457490

Progressive

Progressive

We deliver measurable impact through dynamic leadership

lightbulb

Inspirational

Inspirational

We inspire clients to drive change

redd-f-5U_28ojjgms-unsplash

Respectful

Respectful

We exemplify respect for the planet, our colleagues, customers and our wider stakeholders

There are no ACF fields assigned to this component.

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

.block-features-slider {
	padding: 4rem 1rem;

	.swiper{
		overflow: visible;
	}

	&__heading{
		*{
			margin: 0;
			@include fluid-type(24, 44);
			font-weight: 600;
			color: var(--text-color);
		}
	}

	&[data-rounded-corners="1"]{
		border-radius: 32px;

		@include bp($lg){
			border-radius: 50px;
		}
	}

	&__left{
		background: var(--background-color);
		z-index: 3;
		position: relative;
		display: flex;
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
		margin-bottom: 2rem;

		@include bp($lg){
			margin-bottom: 0;
			flex-direction: column;
			align-items: flex-start;
		}

		&::before{
			content: '';
			position: absolute;
			left: -500%;
			top: 0;
			background: var(--background-color);
			right: 0;
			bottom: -17px;
			z-index: -1;
		}
	}

	&__slide{
		border-radius: 32px;
		overflow: hidden;
		position: relative;
		padding: 20px;
		height: 36vh;
		display: block;
		text-decoration: none;

		@include bp($md){
			border-radius: 52px;
			padding: 28px;
		}


		&:hover{
			.block-features-slider__slide-back{
				bottom: 0;
				transition: .45s ease-in-out;
			}

		}

		&-image-container{
			position: absolute;
			left: 0;
			top: 0;
			width: 100%;
			height: 100%;
			z-index: 0;
			display: flex;

			&::before{
				content: '';
				width: 100%;
				height: 100%;
				position: absolute;
				left: 0;
				top: 0;
				background: linear-gradient(0, var(--primary), transparent);
				z-index: 0;
			}

			img, picture{
				width: 100%;
				height: 100%;
				object-fit: cover;
				object-position: center;
			}
		}

		&-front{
			z-index: 1;
			position: relative;
			display: flex;
			height: 100%;
		}

		&-title{
			color: var(--white);
			@include fluid-type(18, 24);
			font-weight: 600;
			align-self: flex-end;
		}

		&-back{
			padding: 20px;
			z-index: 2;
			transition: .45s ease-in-out;
			position: absolute;
			left: 0;
			bottom: -128%;
			height: calc(100% - 40px);
			width: auto;
			background: var(--white);

			@include bp($md){
				padding: 28px;
				height: calc(100% - 56px);
			}
		}

		&-details{
			height: 88%;
			overflow: auto;
		}

		&-description{
			padding-top: 1rem;
			padding-bottom: 2rem;

			*{
				color: var(--white);
			}
		}

		&-link{
			width: 40px;
			height: 40px;
			border: solid var(--white) 1px;
			display: flex;
			align-items: center;
			justify-content: center;
			border-radius: 100px;
			transition: .3s ease-in-out;
			float: right;
			cursor: pointer;

			&:hover{
				background-color: var(--white);

				.ico--arrow-right{
					background-image: url("data:image/svg+xml,%3Csvg width='28' height='18' viewBox='0 0 28 18' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M20.3682 16.7598L26.7682 8.75977L20.3682 0.759765' stroke='%23383551'/%3E%3Cpath d='M26.7686 8.75977L0.768555 8.75977' stroke='%23383551'/%3E%3C/svg%3E%0A");
				}
			}

			.ico{
				width: 20px;
				height: 20px;

				&--arrow-right{
					background-image: url("data:image/svg+xml,%3Csvg width='28' height='18' viewBox='0 0 28 18' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M20.3682 16.7598L26.7682 8.75977L20.3682 0.759765' stroke='%23fff'/%3E%3Cpath d='M26.7686 8.75977L0.768555 8.75977' stroke='%23fff'/%3E%3C/svg%3E%0A");
				}
			}
		}
	}

	&__navigation-container{
		display: flex;
		flex-direction: row;
		align-items: flex-start;
		gap: 8px;
		justify-content: flex-start;
	}

	&__navigation-btn{
		width: 44px;
		height: 44px;
		border-radius: 100px;
		border: solid 1px var(--text-color);
		display: flex;
		align-items: center;
		justify-content: center;
		cursor: pointer;
		transition: .3s ease-in-out;
		background-position: center;
		background-repeat: no-repeat;
		background-size: 24px;

		&-prev{
			background-image: url("data:image/svg+xml,%3Csvg width='27' height='18' viewBox='0 0 27 18' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7.16895 16.7598L0.768945 8.75977L7.16895 0.759765' stroke='%23383551'/%3E%3Cpath d='M0.768555 8.75977L26.7686 8.75977' stroke='%23383551'/%3E%3C/svg%3E%0A");
		}

		&-next{
			background-image: url("data:image/svg+xml,%3Csvg width='28' height='18' viewBox='0 0 28 18' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M20.3682 16.7598L26.7682 8.75977L20.3682 0.759765' stroke='%23383551'/%3E%3Cpath d='M26.7686 8.75977L0.768555 8.75977' stroke='%23383551'/%3E%3C/svg%3E%0A");
		}

		&:hover{
			background-color: var(--text-color);

			&.block-features-slider__navigation-btn-prev{
				background-image: url("data:image/svg+xml,%3Csvg width='27' height='18' viewBox='0 0 27 18' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7.16895 16.7598L0.768945 8.75977L7.16895 0.759765' stroke='%23fff'/%3E%3Cpath d='M0.768555 8.75977L26.7686 8.75977' stroke='%23fff'/%3E%3C/svg%3E%0A") ;
			}

			&.block-features-slider__navigation-btn-next{
				background-image: url("data:image/svg+xml,%3Csvg width='28' height='18' viewBox='0 0 28 18' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M20.3682 16.7598L26.7682 8.75977L20.3682 0.759765' stroke='%23fff'/%3E%3Cpath d='M26.7686 8.75977L0.768555 8.75977' stroke='%23fff'/%3E%3C/svg%3E%0A") ;
			}
		}

	}

	&.has-background{
		border-radius: 32px;

		@include bp($lg){
			border-radius: 50px;
		}
	}

	&.has-primary-background-color, &.has-secondary-background-color{
		.block-features-slider__navigation-btn-prev{
			background-image: url("data:image/svg+xml,%3Csvg width='27' height='18' viewBox='0 0 27 18' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7.16895 16.7598L0.768945 8.75977L7.16895 0.759765' stroke='%23fff'/%3E%3Cpath d='M0.768555 8.75977L26.7686 8.75977' stroke='%23fff'/%3E%3C/svg%3E%0A");
		}

		.block-features-slider__navigation-btn-next{
			background-image: url("data:image/svg+xml,%3Csvg width='28' height='18' viewBox='0 0 28 18' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M20.3682 16.7598L26.7682 8.75977L20.3682 0.759765' stroke='%23fff'/%3E%3Cpath d='M26.7686 8.75977L0.768555 8.75977' stroke='%23fff'/%3E%3C/svg%3E%0A");
		}

		.block-features-slider__navigation-btn{
			&:hover{
				background-color: var(--text-color);

				&.block-features-slider__navigation-btn-prev{
					background-image: url("data:image/svg+xml,%3Csvg width='27' height='18' viewBox='0 0 27 18' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7.16895 16.7598L0.768945 8.75977L7.16895 0.759765' stroke='%23383551'/%3E%3Cpath d='M0.768555 8.75977L26.7686 8.75977' stroke='%23383551'/%3E%3C/svg%3E%0A") !important;
				}

				&.block-features-slider__navigation-btn-next{
					background-image: url("data:image/svg+xml,%3Csvg width='28' height='18' viewBox='0 0 28 18' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M20.3682 16.7598L26.7682 8.75977L20.3682 0.759765' stroke='%23383551'/%3E%3Cpath d='M26.7686 8.75977L0.768555 8.75977' stroke='%23383551'/%3E%3C/svg%3E%0A") !important;
				}
			}
		}
	}

}
class FeaturesSlider {
	/**
	 * Create and initialise objects of this class
	 * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes/constructor
	 * @param {object} block
	 */
	constructor() {
		this.blocks = document.querySelectorAll('.block-features-slider');
		this.init();
	}

	/**
	 * Example function to run class logic
	 * Can access `this.block`
	 */
	init() {
		this.blocks.forEach((block) => {
			const carousel = block.querySelector('.block-features-slider__right');
			if(carousel){
				const swiper = new Swiper(carousel, {
					loop: true,
					slidesPerView: 1.5,
					autoHeight: true,
					spaceBetween: 24,
					navigation: {
						nextEl: '.block-features-slider__navigation-btn-next',
						prevEl: '.block-features-slider__navigation-btn-prev',
					},
					breakpoints: {
						414:{
							slidesPerView: 2
						},
						767:{
							slidesPerView: 3
						}
					}
				});
			}

		});
	}
}

document.addEventListener('DOMContentLoaded', () => {
	new FeaturesSlider();
});
{
    "$schema": "https://schemas.wp.org/trunk/block.json",
    "apiVersion": 2,
    "name": "strategiq/features-slider",
    "title": "Features Slider",
    "description": "Example block to be used as a template",
    "category": "strategiq",
    "icon": "strategiq",
    "acf": {
        "mode": "preview",
        "renderTemplate": "block-features-slider.php"
    },
    "supports": {
        "anchor": true,
        "align": false,
        "color": {
            "background": true,
            "text": false,
            "gradients": true
        },
        "spacing": {
            "padding": [
                "top",
                "bottom"
            ],
            "margin": [
                "top",
                "bottom"
            ]
        }
    },
    "example": {
        "attributes": {
            "mode": "preview",
            "data": {
                "heading_type": "h2",
                "heading_text": "Example - Example",
                "content": "This is some example content to represent what the content will look like"
            }
        }
    },
    "style": ["file:../../assets/css/features-slider/block-features-slider.css", "swiper"],
	"viewScript": ["features-slider", "swiper"]
}
Page Title
Page Type
Page URL
There are is no readme file with this component.