Scroll Float(022)

Weightless typography effect where characters float smoothly upwards on scroll.

Scroll
Requires:gsap
Loading…

Installation

$npx kibo add scroll-float

Usage

1import { ScrollFloat } from "@/components/kibo/scroll-float/component";
2
3export default function Example() {
4 return (
5 <ScrollFloat />
6 );
7}

Props Reference

PropTypeDefaultDescription
childrenReactNode-Child elements or content to render inside the component.
scrollContainerRefRefObject<HTMLElement | null>-Optional RefObject to a scrollable container element.
containerClassNamestring''Additional CSS classes for the outer wrapper container.
textClassNamestring''Additional CSS classes applied directly to the text elements.
animationDurationnumber0.8Controls the animation duration for the component animation.
easestring'back.out(2)'GSAP or cubic-bezier easing curve for animation smoothing.
scrollStartstring'top bottom+=40%'ScrollTrigger starting threshold string (e.g., 'top 85%').
scrollEndstring'bottom bottom-=40%'ScrollTrigger ending threshold string (e.g., 'bottom 40%').
staggernumber0.025Stagger delay in seconds between individual characters/elements.
triggerOnHoverbooleantrueControls the trigger on hover for the component animation.