TailwindMerge 1.0.4

dotnet add package TailwindMerge --version 1.0.4                
NuGet\Install-Package TailwindMerge -Version 1.0.4                
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="TailwindMerge" Version="1.0.4" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add TailwindMerge --version 1.0.4                
#r "nuget: TailwindMerge, 1.0.4"                
#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 TailwindMerge as a Cake Addin
#addin nuget:?package=TailwindMerge&version=1.0.4

// Install TailwindMerge as a Cake Tool
#tool nuget:?package=TailwindMerge&version=1.0.4                

tailwind-merge-nuget

A TailwindCSS class merge utility similar to Shadcn UI / Tailwind Merge

NOTE this is a very simple implementation of Tailwind class merging and likely has many, many edge cases that are not covered. It is a simple implementation that works for my current use case. If you find a bug, please submit a PR with a test case and I will strive to update this package.

Usage

@using TailwindMerge
@{
    var conditionalCheck = true;
}

<div class="@TW.Merge(
    "bg-red-500", 
    "text-white", 
    conditionalCheck ? "p-4" : "p-2",
    "flex flex-col justify-center items-center"
)">
    Hello World
</div>

Tests being implemented to match https://github.com/dcastil/tailwind-merge/tree/main/tests

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  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.
  • net8.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
1.0.4 2,134 11/29/2023
1.0.0 138 11/29/2023