Skip to content

Scrolling inside different containers #15

@ganderzz

Description

@ganderzz

Right now React-Scroll-To only supports scrolling on the window, but there are use-cases where a user might want to scroll inside different containers (say a div).

Proposed Idea:
Add a new prop to <ScrollTo> to accept a 'scrolling location'. This would look like:

<ScrollTo container={divRef}>
    {scroll => ... }
</ScrollTo>

Where the container could be a Ref passed in. If nothing is given in the container prop, default to using window.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions