GithubHelp home page GithubHelp logo

Comments (7)

KyleAMathews avatar KyleAMathews commented on June 15, 2024 2

The idea is it should feel like you're uncovering the header by scrolling up not that it over eagerly jumps out at you. Perhaps even don't finish animating down if the user stops scrolling.

from react-headroom.

KyleAMathews avatar KyleAMathews commented on June 15, 2024

Well, this wouldn't make things any slower as we're already getting scroll info. Just have to start measuring scroll velocity and dynamically setting transition time (based on height of header). So pixels/second matches scroll.

from react-headroom.

KyleAMathews avatar KyleAMathews commented on June 15, 2024

Not sure when I'll get to this so if someone wants to take a crack it that'd be awesome!

from react-headroom.

KyleAMathews avatar KyleAMathews commented on June 15, 2024

Idea originally from Andrew Ingram https://twitter.com/andrewingram/status/783597575509307392

from react-headroom.

AndrewIngram avatar AndrewIngram commented on June 15, 2024

Might not have to read the DOM if we can accurately calculate deltas from the scroll event itself. I've usually done it by reading scrollY, but that's pretty flaky anyway because of things like bounce effects at the scroll extremes.

from react-headroom.

KyleAMathews avatar KyleAMathews commented on June 15, 2024

Oh true. But in any case, I was thinking clearly as this module is already measuring scroll events and page offsets so adding your cool idea wouldn't make anything slower.

from react-headroom.

geohuz avatar geohuz commented on June 15, 2024

I found the demo in this url: https://osvaldas.info/auto-hide-sticky-header is doing exactly like your description, it looks more nature. BTW, I have a question of how to make the scrolling head effect as 'slide up' and 'slide down', not just move it off the page and into the page? As described in the google scrolling techniques: https://material.google.com/patterns/scrolling-techniques.html#scrolling-techniques-app-bar-scrollable-regions, the video in the behavior section.

from react-headroom.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.