How techlemur/lax-parallax works
Lax is a small React parallax component: consumers configure a child element, and its position relative to a scrolling viewport drives CSS transforms and visual effects. The implementation initializes element geometry, handles scroll events, computes effect values, and renders the styled wrapper. The README also recommends Lenis for smooth scrolling; it is an optional consumer-side integration. The graph is based on the README and the sole runtime source excerpt.
Main entry points: index.jsx Lax wrapper
Components 7
Parallax component
- Lax wrapper
src/index.jsx - Styled child output
src/index.jsx
Scroll effects
- Position initialization
src/index.jsx - Scroll handler
src/index.jsx - Effect calculations
src/index.jsx
Other components
- React consumer
- Lenis scrolling
Connections 7
- React consumer → Lax wrapper: configures
README.md - Lax wrapper → Position initialization: initializes
src/index.jsx - Position initialization → Scroll handler: sets position
src/index.jsx - Scroll handler → Effect calculations: computes effects
src/index.jsx - Scroll handler → Styled child output: updates state
src/index.jsx - Lax wrapper → Styled child output: renders
src/index.jsx - Lenis scrolling → React consumer: smooth scrolling
README.md