Skip to content

Added scroll-to-top button for improved navigation#218

Merged
vicheanath merged 1 commit intovailabel:mainfrom
vishalm342:feature/scroll-to-top-button
Mar 14, 2026
Merged

Added scroll-to-top button for improved navigation#218
vicheanath merged 1 commit intovailabel:mainfrom
vishalm342:feature/scroll-to-top-button

Conversation

@vishalm342
Copy link
Copy Markdown
Contributor

PR Description
Adds a floating “scroll-to-top” button to the web site for faster navigation on long pages.

What’s changed

  • New component: apps/web/components/ScrollToTop.tsx
  • Wired into global layout: apps/web/app/layout.tsx

Behavior

  • Appears after scrolling 300px.
  • Smoothly scrolls to top on click.
  • Accessible (aria-label, focus ring), keyboard-friendly.
  • Matches Tailwind design and supports dark mode.
  • Positioned bottom-right (fixed).

Test plan

  • Run: npm run web (or npm run dev and open http://localhost:3000)
  • Scroll down homepage/docs; button appears.
  • Click button → smooth scroll to top.
  • Verify in light/dark mode and on mobile sizing.

Implementation details

  • Client component using window scroll listener.
  • Visibility threshold = 300px.
  • No breaking changes; renders globally from layout.tsx.

Linked issue
Closes #217

Screenshot

image

@vercel
Copy link
Copy Markdown

vercel Bot commented Oct 30, 2025

@vishalm342 is attempting to deploy a commit to the vailabel Team on Vercel.

A member of the Team first needs to authorize it.

@vishalm342
Copy link
Copy Markdown
Contributor Author

hey, Vercel deployment is failing with "Authorization required to deploy" - this needs repository owner permissions to resolve.

The code is ready to merge once the Vercel authorization is configured.

label it as hacktoberfest and close the PR, Thanks!

@vicheanath vicheanath merged commit c8c773a into vailabel:main Mar 14, 2026
0 of 2 checks passed
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.

Add 'Scroll to Top' Arrow Button for Enhanced Navigation

2 participants