TailwindCssTagHelpers 0.1.0
See the version list below for details.
dotnet add package TailwindCssTagHelpers --version 0.1.0
NuGet\Install-Package TailwindCssTagHelpers -Version 0.1.0
<PackageReference Include="TailwindCssTagHelpers" Version="0.1.0" />
paket add TailwindCssTagHelpers --version 0.1.0
#r "nuget: TailwindCssTagHelpers, 0.1.0"
// 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
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 | Versions 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. |
-
.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 | 3,154 | 4/9/2024 |
0.5.0 | 6,045 | 2/24/2023 |
0.4.0 | 2,932 | 10/13/2022 |
0.3.0 | 417 | 10/12/2022 |
0.2.0 | 820 | 9/25/2022 |
0.1.0 | 1,649 | 12/19/2021 |
0.1.0-beta.50 | 168 | 8/21/2021 |
0.1.0-beta.10 | 165 | 2/19/2021 |