Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-Designed and Enhanced "Back to Top" Button Aesthetics and Functionality #364

Merged
merged 4 commits into from
Jul 7, 2024

Conversation

MastanSayyad
Copy link
Contributor

@MastanSayyad MastanSayyad commented Jul 6, 2024

Hey @Akshatchaube01 Issue closes #346

I have created and added "Back to Top" button both aesthetically and functionally in the application.

Changes I made

  • Added a useEffect hook to manage scroll event listeners.
  • Implemented a smooth scroll effect when the button is clicked using the window.scrollTo method.
  • Set the visibility threshold for the button to appear after scrolling 200 pixels down.
  • Styled the button using styled-components
  • Added a smooth transition effect for background color and transform properties.
  • Applied styles for positioning, sizing, color, and hover effects.
  • Added transform: translateY(-5px) to move the button and arrow upward on hover.
  • included a transition for smooth visual effects on hover.
  • Added z-index 9999 to appear the button in front of web components

Screen Record

fixx.mp4

Please take a look and review it, also if possible add higher level labels, Thank YOU!!

Copy link

vercel bot commented Jul 6, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
time-warp ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 6, 2024 8:05pm

@Akshatchaube01 Akshatchaube01 merged commit f4b7f6c into Akshatchaube01:main Jul 7, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: Re-Design the Scroll-to-Top Button as Current One is Not Working
2 participants