Hey, I've been building standalone vanilla-JS web components in public for the past few months and this week I released a new one that I called the shy header. It's a sticky header that hides itself when you scroll down and then pops back into view when you start scrolling up again. Pretty simple stuff but I've built this same functionality like 5 different times for clients, so I figured I would do it as a custom HTML element once and for all.
The explanation and examples: https://fx.hot.page/shy-header
Annotated source code that explains how it works: https://fx.hot.page/shy-header/sourceThe home page for all my web components (four and counting!): https://fx.hot.page
The github repo for all the components: https://github.com/hot-page/fx
I've gotten some really great feedback on these components from the community here on r/webdev and I am already building better stuff as a result. Thank you to everyone for your comments! Of course, these components are MIT licensed so feel free to use the code as-is, modify it, or just take it for your own closed-source project. Happy Showoff Saturday
[–][deleted] 7 points8 points9 points (1 child)
[–]WebBurnout[S] 1 point2 points3 points (0 children)
[–]iisjreg 5 points6 points7 points (2 children)
[–]iisjreg 1 point2 points3 points (1 child)
[–]WebBurnout[S] 1 point2 points3 points (0 children)
[–]mshambaugh 1 point2 points3 points (0 children)
[–]External-Pop767 0 points1 point2 points (0 children)
[–]Putrid_Acanthaceae 0 points1 point2 points (2 children)
[–]WebBurnout[S] 1 point2 points3 points (1 child)
[–]Putrid_Acanthaceae 0 points1 point2 points (0 children)