Getting Started
Components
Special Effects
Animations
Text Animations
Backgrounds
import {
ScrollVelocityContainer,
ScrollVelocityRow,
} from "@/components/ui/scroll-based-velocity"
<ScrollVelocityContainer className="text-4xl font-bold md:text-7xl">
<ScrollVelocityRow baseVelocity={20} direction={1}>
Velocity Scroll
</ScrollVelocityRow>
<ScrollVelocityRow baseVelocity={20} direction={-1}>
Velocity Scroll
</ScrollVelocityRow>
</ScrollVelocityContainer>
Prop | Type | Default | Description |
---|---|---|---|
className | string | - | The class name to be applied to the component |
children | ReactNode | - | Content to be animated |
Prop | Type | Default | Description |
---|---|---|---|
className | string | - | The class name to be applied to the row container |
children | ReactNode | - | Content to be duplicated and scrolled |
baseVelocity | number | 5 | Base scroll velocity percentage of content width |
direction | 1 | -1 | 1 | Scroll direction (1 = left-to-right, -1 = reverse) |