GuavaSoft.Links
1.0.0
dotnet add package GuavaSoft.Links --version 1.0.0
NuGet\Install-Package GuavaSoft.Links -Version 1.0.0
<PackageReference Include="GuavaSoft.Links" Version="1.0.0" />
paket add GuavaSoft.Links --version 1.0.0
#r "nuget: GuavaSoft.Links, 1.0.0"
// Install GuavaSoft.Links as a Cake Addin #addin nuget:?package=GuavaSoft.Links&version=1.0.0 // Install GuavaSoft.Links as a Cake Tool #tool nuget:?package=GuavaSoft.Links&version=1.0.0
GuavaSoft Blazor Anchor Navigation Tool built on top of <a target="blank" href="https://github.com/DevExpress/Blazor/tree/master/tools/DevExpress.Blazor.AnchorUtils">DevExpress Anchor</a> with no javascript require
The GuavaSoft Anchor Navigation tool automatically scrolls a page to an anchor in the following instances:
- When an end-user clicks a hyperlink with an anchor; The tool also includes the Blazor AnchorLink component. Use this component to create in-page navigation links as needed:
<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>
Usage
Follow the steps below to add the tool to your Blazor application.
- Adding it to your project with nuget
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" />
- Register the GuavaSoft.Links namespace in the _Imports.razor file:
@using GuavaSoft.Links
- Add the non-visual AnchorLinkProvider component to the Shared/MainLayout.razor file: (Optional)Provide the OffsetSelector parameter with your pinned (non-scrollable) header css selector (like .top-row in the standard Blazor project)
<div class="main">
...
<div class="content px-4">
@Body
</div>
</div>
<AnchorLinkProvider OffsetSelector=".content" />
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net6.0
- Microsoft.AspNetCore.Components.Web (>= 6.0.6)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.0.0 | 245 | 11/11/2022 |