Skip to content

feat: Add Active Highlighting for Navigation Links #2008

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

manasvihow
Copy link

What does this PR do?

This PR implements active link highlighting in the main header navigation. The link for the current page (/gears, etc.) or page section (/#courses) will now have a distinct style.

34a271523c674689b78bffdd49e5b86a.mp4

This was achieved by using the useRouter hook and comparing router.asPath with the link's href to conditionally apply an active_link CSS class.

Closes #107

Copy link

vercel bot commented Aug 14, 2025

@manasvihow is attempting to deploy a commit to the Piyush Garg's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions github-actions bot added Amazing This Indicates that the issue/PR is amazing and worth checking UI/UX Issues Related to UI UX labels Aug 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Amazing This Indicates that the issue/PR is amazing and worth checking UI/UX Issues Related to UI UX
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature:It will be good if navbar element will highlight according where the user currently is
1 participant