Skip to content

feat: add floating scroll-to-top button#19

Open
Atharvaj146 wants to merge 1 commit into
notsoocool:mainfrom
Atharvaj146:feature/scroll-to-top
Open

feat: add floating scroll-to-top button#19
Atharvaj146 wants to merge 1 commit into
notsoocool:mainfrom
Atharvaj146:feature/scroll-to-top

Conversation

@Atharvaj146
Copy link
Copy Markdown

Description

This PR addresses the navigation issue on longer pages by adding a floating scroll-to-top button.

Per the maintainer's feedback on the original issue, the existing dark mode toggle has been left in its original position. The new ScrollToTop component has been positioned slightly above the dark mode toggle at bottom-20 right-6 to avoid any overlap while maintaining a clean aesthetic.

Changes Made

  • Created a new ScrollToTop client component in components/scroll-to-top.tsx that appears when scrolling down past 300px.
  • Uses smooth scrolling to quickly return the user to the top of the page.
  • Added the <ScrollToTop /> component to the RootLayout (app/layout.tsx) so it is globally available across all long pages.

Fixes Issue

Fixes #7

image

Adds a floating scroll-to-top button in the bottom-right corner for easier navigation on longer pages. The button sits nicely above the existing theme toggle as requested by the maintainer.
@vercel
Copy link
Copy Markdown

vercel Bot commented May 19, 2026

@Atharvaj146 is attempting to deploy a commit to the notsoocool's projects Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

UI Enhancement: Move theme toggle to navbar and add scroll-to-top button

1 participant