Wrap a section. Put its content in ParallaxPatternContent, so only the pattern moves.
stats-section.tsx
ParallaxPattern
<div>| Prop | Type | Default | Description |
|---|---|---|---|
| container | RefObject<HTMLElement | null> | — | The scroll box, when the item scrolls inside one and not with the page. |
| pointer | boolean | false | Adds the pointer source: the layers drift toward the mouse over the item. Default false. |
| disabled | boolean | — | Rests every layer and stops the work. |
| pattern | "dots""grid""hatch" | — | |
| speed | number | 1 | How far the pattern lags behind the page, as a multiplier of the designed lag (1, the default: 20% slower than the page, so it looks far behind the content). 2 lags twice as much, 0 keeps it with the page, and a negative value runs ahead of it. |
| depth | number | 16 | px the pattern drifts away from the mouse at the edge of the box, with pointer. Default 16. A negative depth drifts toward the mouse. |
| ...props | <div> attributes | — | Every other attribute goes to the <div>, with a ref. |
ParallaxPatternContent
<div>| Prop | Type | Default | Description |
|---|---|---|---|
| ...props | <div> attributes | — | Every other attribute goes to the <div>, with a ref. |
Built with
Installs with Parallax Pattern
- Components
- Parallax













