Scroll Velocity(024)

Infinite marquee text banners accelerating dynamically based on page scroll velocity.

Scroll
Requires:motion
Loading…

Installation

$npx kibo add scroll-velocity

Usage

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

Props Reference

PropTypeDefaultDescription
childrenReact.ReactNode-Child elements or content to render inside the component.
baseVelocitynumbervelocityControls the base velocity for the component animation.
scrollContainerRefReact.RefObject<HTMLElement>-Optional RefObject to a scrollable container element.
classNamestring''Additional CSS classes for styling and layout.
dampingnumber50Controls the damping for the component animation.
stiffnessnumber400Controls the stiffness for the component animation.
numCopiesnumber6Controls the num copies for the component animation.
velocityMappingVelocityMapping{ input: [0, 1000], output: [0, 5] }Controls the velocity mapping for the component animation.
parallaxClassNamestring-Controls the parallax class name for the component animation.
scrollerClassNamestring-Controls the scroller class name for the component animation.
parallaxStyleReact.CSSProperties-Controls the parallax style for the component animation.
scrollerStyleReact.CSSProperties-Controls the scroller style for the component animation.
scrollContainerRefReact.RefObject<HTMLElement>-Optional RefObject to a scrollable container element.
textsReact.ReactNode[][]Controls the texts for the component animation.
velocitynumber100Controls the velocity for the component animation.
classNamestring''Additional CSS classes for styling and layout.
dampingnumber50Controls the damping for the component animation.
stiffnessnumber400Controls the stiffness for the component animation.
numCopiesnumber6Controls the num copies for the component animation.
velocityMappingVelocityMapping{ input: [0, 1000], output: [0, 5] }Controls the velocity mapping for the component animation.
parallaxClassNamestring-Controls the parallax class name for the component animation.
scrollerClassNamestring-Controls the scroller class name for the component animation.
parallaxStyleReact.CSSProperties-Controls the parallax style for the component animation.
scrollerStyleReact.CSSProperties-Controls the scroller style for the component animation.