#How scroll with smoth animation using anchor and <Link> component ?
7 messages · Page 1 of 1 (latest)
🔎 This post has been indexed in our web forum and will be seen by search engines so other users can find it outside Discord
🕵️ Your user profile is private by default and won't be visible to users outside Discord, if you want to be visible in the web forum you can add the "Public Profile" role in id:customize
✅ You can mark a message as the answer for your post with Right click -> Apps -> Mark Solution
(if you don't see the option, try refreshing Discord with Ctrl + R)
you need to set it to smooth
and use <a> tag for scrolling to certain sections and not Link tag
Thank you, why i need to use <a> tag and not <Link> tag ? Other thing, i have a fixed element (the header) i need more marging when the anchor make the app scroll into the element, there is something i could do ? I just do not want to make strange customized code ^^
It is discourages to use Link tag for scrolling on same page.
For extra margin, you need to listen to scroll event in useEffect and add css styles accordingly