Honey Butter

HB GSAP FX Library

Every attribute, class, and default value for the HB GSAP FX animation library.

Getting Started

FeatureData AttributeClassDefaultNotes
Triggern/ahb-gsap-triggern/aRequired on every animated element
Disable on mobiledata-style="… mobile:off"n/aenabledSkips animation on screens ≤ 768px. Add as a space-separated token inside data-style.

Animation Effects

Apply via data-style="effect-name" or the equivalent class. Multiple effects can be combined in data-style with spaces (e.g. data-style="fade-in slide-in-up"). Class usage applies one effect per class.

Effectdata-style valueClassAnimatesNotes
Fade Infade-inhb-fade-inopacity 0 → 1
Scale Upscale-uphb-scale-upscale 0.6 → 1Override start scale with data-scale
Scale Downscale-downhb-scale-downscale 1.4 → 1Override start scale with data-scale
Slide In Leftslide-in-lefthb-slide-in-leftx −10 → 0Override distance with data-distance or data-distance-x
Slide In Rightslide-in-righthb-slide-in-rightx 10 → 0Override distance with data-distance or data-distance-x
Slide In Upslide-in-uphb-slide-in-upy 10 → 0Override distance with data-distance or data-distance-y
Slide In Downslide-in-downhb-slide-in-downy −10 → 0Override distance with data-distance or data-distance-y
Rotaterotatehb-rotaterotation −90° + opacity 0 → 0° + opacity 1
Blur Inblur-inhb-blur-inblur(8px) + opacity 0 → blur(0) + opacity 1Override blur amount with data-blur or hb-blur-{n}

Animation Options

OptionData AttributeClassDefaultNotes
Durationdata-duration="0.8"n/a0.6Seconds
Delaydata-delay="0.2"n/a0Seconds before animation starts
Staggerdata-stagger="0.1"n/a0.05Seconds between each split unit (chars/words/lines)
Easingdata-ease="power4.out"hb-ease-power4-outpower2.outAny GSAP ease. In class form, replace . with - (e.g. hb-ease-elastic-out)
Scroll Startdata-start="top 80%"n/atop 90%ScrollTrigger start value
Toggle Actionsdata-toggle="play none none none"n/aplay none none reverseScrollTrigger toggleActions. Controls enter / leave / re-enter / re-leave behaviour.
Slide Distancedata-distance="40"hb-slide-distance-40preset (10px)Applies to both X and Y slide effects
Slide Distance Xdata-distance-x="40"hb-slide-distance-x-40falls back to data-distanceOverrides horizontal slide distance only
Slide Distance Ydata-distance-y="40"hb-slide-distance-y-40falls back to data-distanceOverrides vertical slide distance only
Scale Overridedata-scale="0.8"n/apreset (0.6 / 1.4)Overrides the start scale for scale-up and scale-down
Blur Amountdata-blur="12"hb-blur-128 (px)Controls starting blur for blur-in

SplitText

SplitText elements are deferred until document.fonts.ready to ensure correct line breaking. Each split unit is animated with the stagger value.

Split TypeData AttributeClassDefaultNotes
Split by Charsdata-split="chars"hb-split-charsn/aAnimates each character individually
Split by Wordsdata-split="words"hb-split-wordsn/aAnimates each word individually
Split by Linesdata-split="lines"hb-split-linesn/aAnimates each line individually (recalculates on resize)
No-Split Zonen/ahb-no-splitn/aAdd to a child element inside a split container to exclude it from splitting

Pinning

Pinning is a separate feature — add hb-pin directly to the element (no hb-gsap-trigger needed).

OptionData AttributeClassDefaultNotes
Pin Elementn/ahb-pinn/aRequired to activate pinning
Pin Startdata-pin-start="top top"n/atop topWhen the pin locks in place
Pin Enddata-pin-end="+=200%"n/a+=100%How long the element stays pinned (scroll distance)
Pin Scrubdata-pin-scrub="true"n/afalseSet to "true" to tie the pin to scroll position

Quick Examples

GoalClassesData Attributes
Simple fade in<div class="hb-gsap-trigger hb-fade-in"><div class="hb-gsap-trigger" data-style="fade-in">
Fade + slide up, slower<div class="hb-gsap-trigger hb-fade-in hb-slide-in-up"><div class="hb-gsap-trigger" data-style="fade-in slide-in-up">
Words stagger in<h2 class="hb-gsap-trigger hb-split-words hb-fade-in hb-slide-in-up"><h2 class="hb-gsap-trigger" data-split="words" data-style="fade-in slide-in-up">
Chars stagger with custom easen/a<h1 class="hb-gsap-trigger" data-split="chars" data-style="fade-in slide-in-up" data-ease="back.out" data-stagger="0.03">
Blur in, skip on mobile<div class="hb-gsap-trigger hb-blur-in"><div class="hb-gsap-trigger" data-style="blur-in mobile:off">
Play once (don’t reverse)n/a<div class="hb-gsap-trigger hb-fade-in" data-toggle="play none none none">
Pin for 200% scroll<section class="hb-pin" data-pin-end="+=200%">