TailwindCssTagHelpers 0.1.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package TailwindCssTagHelpers --version 0.1.0
NuGet\Install-Package TailwindCssTagHelpers -Version 0.1.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="TailwindCssTagHelpers" Version="0.1.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add TailwindCssTagHelpers --version 0.1.0
#r "nuget: TailwindCssTagHelpers, 0.1.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 TailwindCssTagHelpers as a Cake Addin
#addin nuget:?package=TailwindCssTagHelpers&version=0.1.0

// Install TailwindCssTagHelpers as a Cake Tool
#tool nuget:?package=TailwindCssTagHelpers&version=0.1.0

tailwindcss-tag-helpers

CI build status NuGet Package GitHub Package Registry Project license

ASP.NET tag helpers to make working with Tailwind CSS and Tailwind UI easier.

Installation

dotnet add package TailwindCssTagHelper

Setup

In your _ViewImports.cshtml add:

@addTagHelper *, TailwindCssTagHelper

Usage

LinkTagHelper

The link tag helper will compare the href to the current url and apply one of two sets of css classes.

The default-class list will be applied if the urls don't match, and the current-class list will be applied if the urls do match.

The naming of these attributes aligns with the comments found in the Tailwind UI templates and the -class suffix allows the attributes to automatically work with Headwind.

The matching method can be either Full (default) which ensures the link path and current path are the same, or Base which ensures the link path starts with, or is the same as, the current path.

ℹī¸ Query string values are not used for either method of matching.

<a
  asp-area="" asp-controller="Home" asp-action="Index"
  class="px-3 py-2 text-sm font-medium rounded-md"
  default-class="text-gray-300 hover:bg-gray-700 hover:text-white"
  current-class="text-white bg-gray-900"
  match="Base"
>
  Home
</a>
Product Compatible and additional computed target framework versions.
.NET net5.0 is compatible.  net5.0-windows was computed.  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. 
.NET Core netcoreapp3.1 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETCoreApp 3.1

    • No dependencies.
  • net5.0

    • No dependencies.
  • net6.0

    • No dependencies.

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
0.6.0 784 4/9/2024
0.5.0 5,743 2/24/2023
0.4.0 2,753 10/13/2022
0.3.0 386 10/12/2022
0.2.0 794 9/25/2022
0.1.0 1,613 12/19/2021
0.1.0-beta.50 155 8/21/2021
0.1.0-beta.10 147 2/19/2021