GuavaSoft.Links 1.0.0

dotnet add package GuavaSoft.Links --version 1.0.0                
NuGet\Install-Package GuavaSoft.Links -Version 1.0.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="GuavaSoft.Links" Version="1.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add GuavaSoft.Links --version 1.0.0                
#r "nuget: GuavaSoft.Links, 1.0.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// 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.

  1. 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" />
  1. Register the GuavaSoft.Links namespace in the _Imports.razor file:
@using GuavaSoft.Links
  1. 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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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