Skip to content

Set Parallax Custom Scroll Container #1273

@ghost

Description

🚀 Feature Proposal

(A clear and concise description of what the feature is.)

This Parallax Library is very useful, when you combine it with the lerp configs, it has the potential to better than rellax.js, react-scroll-parallax, etc. All it needs is the ability to change the Scroll Container it depends on.

Motivation

Rellax.js and many others have poor performance when you compare them directly with react-spring parallax. Most mobile performance is basically unusable with the alternative libraries. If the library doesn't have bad performance, it's the lack of options and customizability. My biggest gripe is not being able to change the scroll container, or if you can, it is done ugly and intuitive.

(Please outline the motivation for the proposal.)

Lack of customizability with alternatives, already achieved with react-spring, but with the addition of a scroll container prop option would resolve that. Also, the change to optional pages props, since it would then rely on the scroll container prop.

Example

<Parallax scrollContainer={containerRef} pages={false}> //parallax content </Parallax>

(Please provide an example of how this feature would be used.)

Here's an example using react-scroll-parallax with a custom scrollContainer prop: https://codesandbox.io/s/spring-butterfly-e5006?file=/src/App.js

Thank you for your time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind: requestNew feature or request that should be actioned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions