GSAP Guide
You can find the code in (Site settings) Footer Code.
1. Projects Slider
A 3D-style projects slider with autoplay, prev/next navigation, side preview cards, and smooth perspective transitions.
Selectors Used
- .projects-slider — main slider wrapper
- .projects-slide — individual slide
- .projects-slide-inner — inner content wrapper used for scale/rotation
- .project-slide-gradient-1 — left side gradient overlay
- .project-slide-gradient-2 — right side gradient overlay
- .projects-slider-prev — previous button
- .projects-slider-next — next button
Customising timing
To change autoplay delay (default 4000ms):
const autoplayDelay = 4000;To change animation speed (Lower number = faster transitions):
const duration = 0.85;Change side slide position (Increase values to push side cards further away):
Left:
xPercent: -105Right:
xPercent: 105Change side card scale (Increase for larger side cards):
scale: 0.72Change side card rotation (Higher values increase 3D perspective effect):
Left:
rotateY: -20Right:
rotateY: 20Removing Autoplay
Delete or comment out:
startAutoplay();And remove:
section.addEventListener('mouseenter', stopAutoplay);
section.addEventListener('mouseleave', startAutoplay);Prev/next buttons will still work normally.
Removing Slider Entirely
Delete the entire Projects Slider script block.
2. Process Steps Images
A clickable image switcher controlled by step buttons.
Clicking a step button fades between images and updates the active button state.
Clicking a step button fades between images and updates the active button state.
Selectors Used
- .process-item-image — images that switch on click
- .step-btn.is-active — active button class
- .step-btn — clickable step buttons
Default Active Image
The second image is active initially:
Change the number to use another default image.
let currentIndex = 1;Change Fade Speed
Lower value = faster fade
duration: 0.5Removing
Delete the entire Process Steps script block.
3. Services Accordion
An animated accordion section with image switching, stagger animations, and locked active items.
Only one accordion item can stay open at a time.
The first item is open by default.
Selectors Used
- .service-item — accordion item
- .service-item-bottom — expandable content area
- .service-feature-item — staggered feature items
- .service-item-img — corresponding service image
- .service-item-icon.plus — plus icon
- .service-item-icon.minus — minus icon
Default Open Item
0 = first item
let activeIndex = 0;Change Accordion Open Speed
duration: 0.4Used here:
gsap.to(nextBottom, {
height: 'auto',
duration: 0.4,
});Change Feature Stagger Speed
Open:
stagger: 0.1Close:
stagger: 0.05Change Image Fade Speed
duration: 0.5Locked Active Item
The active item cannot be closed manually.
This line prevents closing:
if (index === activeIndex) return;Removing this line allows toggling open/close behaviour.
Removing
Delete the entire Services Accordion script block.
4. Insights Hover Cards
An interactive hover-based card layout for desktop.
Hovering a card enlarges it while shrinking the others.
The layout resets when the mouse leaves the wrapper.
Desktop only (min-width: 992px).
Selectors Used
- [data-wrapper="insights"] — card wrapper
- data-default="last" — last card active by default
- data-default="first" — first card active by default
- [data-card="insight"] — individual insight card
Setting Default Active Card
First Card:
data-default="first"Last Card:
data-default="last"Add these attributes on the wrapper.
Change Expanded Width
50 = 50%
const bigWidth = 50;Change Small Card Width
const smallWidth = total > 1 ? 50 / (total - 1) : 100;Change Card Heights
Active Card:
height: '100%'Inactive Card:
height: '70%'Change Animation Speed
duration: 0.8Mobile Behaviour
The animation only runs on desktop:
(min-width: 992px)You can change the breakpoint if needed.
Removing
Delete the entire Insights Hover Cards script block.