About Anchor Navigation tool that automatically scrolls a page to an anchor.
$ dotnet add package GuavaSoft.LinksGuavaSoft Blazor Anchor Navigation Tool built on top of DevExpress Anchor with no javascript require
The GuavaSoft Anchor Navigation tool automatically scrolls a page to an anchor in the following instances:
<AnchorLink class="nav-link py-3 px-4" href="#MySection1">My Section 1</AnchorLink>
When an end-user clicks the link, the page scrolls to the corresponding anchor:
<h2 id="MySection1">Section 1</h2>
<p>Lorem ipsum dolor sit amet...</p>
<h2 id="MySection2">Section 2</h2>
<p>Quisque imperdiet risus quis nisl vulputate...</p>
Follow the steps below to add the tool to your Blazor application.
Package Manager
Install-Package Guavasoft.Links -Version 1.0.0
.NET CLI
dotnet add package Guavasoft.Links --version 1.0.0
PackageReference
<PackageReference Include="Guavasoft.Links" Version="1.0.0" />
@using GuavaSoft.Links
<div class="main">
...
<div class="content px-4">
@Body
</div>
</div>
<AnchorLinkProvider OffsetSelector=".content" />