Noundry.Tailbreeze.Build 1.3.0

dotnet add package Noundry.Tailbreeze.Build --version 1.3.0
                    
NuGet\Install-Package Noundry.Tailbreeze.Build -Version 1.3.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="Noundry.Tailbreeze.Build" Version="1.3.0">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Noundry.Tailbreeze.Build" Version="1.3.0" />
                    
Directory.Packages.props
<PackageReference Include="Noundry.Tailbreeze.Build">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Noundry.Tailbreeze.Build --version 1.3.0
                    
#r "nuget: Noundry.Tailbreeze.Build, 1.3.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.
#:package Noundry.Tailbreeze.Build@1.3.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Noundry.Tailbreeze.Build&version=1.3.0
                    
Install as a Cake Addin
#tool nuget:?package=Noundry.Tailbreeze.Build&version=1.3.0
                    
Install as a Cake Tool

Tailbreeze

A .NET library for integrating Tailwind CSS into ASP.NET applications with zero Node.js dependency.

Features

  • Zero Node.js - Uses official Tailwind CSS standalone CLI
  • Three Modes - CDN (best DX), Full (no CLI), or Optimized (smallest output)
  • Auto-detection - Finds your Razor/Blazor files automatically
  • Component Libraries - Auto-integrates with Noundry.UI and similar libraries
  • Hot Reload - CSS recompiles on file changes during development
  • Production Ready - Minified, tree-shaken CSS for production builds

How It Works

Tailbreeze downloads the official Tailwind CSS standalone CLI from GitHub releases and manages it locally. During development, it runs the CLI in watch mode to automatically recompile CSS when your Razor/Blazor files change.

Your .cshtml/.razor files  -->  Tailwind CLI (watch mode)  -->  compiled CSS  -->  browser

Requirements

  • .NET 8.0, 9.0, or 10.0
  • Windows, macOS, or Linux (x64 or arm64)
  • Internet connection (first run only, to download CLI)

Installation

dotnet add package Noundry.Tailbreeze

Quick Start

1. Add to Program.cs

using Tailbreeze.Extensions;

var builder = WebApplication.CreateBuilder(args);

builder.Services.AddRazorPages();
builder.Services.AddTailbreeze();

var app = builder.Build();

app.UseStaticFiles();
app.UseTailbreeze();
app.MapRazorPages();

app.Run();

2. Add to your layout

Razor Pages / MVC (_Layout.cshtml):

@addTagHelper *, Tailbreeze

<!DOCTYPE html>
<html>
<head>
    <tailwind-link />
</head>
<body>
    @RenderBody()
</body>
</html>

Blazor (App.razor):

<link rel="stylesheet" href="/tailbreeze/app.css" />

3. Run

dotnet run

That's it! On first run, Tailbreeze automatically:

  1. Downloads the Tailwind CLI (~15MB) to local cache
  2. Creates Styles/app.css with Tailwind directives
  3. Creates tailwind.config.js with auto-detected content paths
  4. Starts watch mode to compile CSS on file changes

Compilation Modes

Tailbreeze supports three compilation modes to optimize for different scenarios:

Mode Development Production Best For
Cdn (default) Uses cdn.tailwindcss.com CLI compiles optimized CSS Most projects
Full CDN fallback Full CSS (~300KB gzip) Simple apps, offline
Optimized CLI watch mode CLI with tree-shaking Performance-critical
// CDN mode (default) - best developer experience
builder.Services.AddTailbreeze();

// Full mode - no CLI dependency, larger output
builder.Services.AddTailbreeze(opts => opts.Mode = TailbreezeMode.Full);

// Optimized mode - traditional CLI behavior, smallest output
builder.Services.AddTailbreeze(opts => opts.Mode = TailbreezeMode.Optimized);

Why CDN Mode is Default

  • Instant startup - No CLI download or compilation delay
  • All classes available - Every Tailwind class works immediately
  • Production optimized - CLI still compiles tree-shaken CSS for production
  • Best DX - Just write code, no waiting

Component Library Integration

Tailbreeze automatically detects and includes CSS classes from component libraries like Noundry.UI.

How It Works

  1. When you install Noundry.UI, its MSBuild target copies a safelist file to your project
  2. Tailbreeze detects the safelist and adds it to Tailwind's content paths
  3. All component classes are included in compiled CSS automatically

No manual configuration required!

// Just add both packages - integration is automatic
builder.Services.AddNoundryUI();
builder.Services.AddTailbreeze();

Supported Files (Auto-detected)

File Description
noundry-ui-safelist.html Noundry.UI component classes
noundry-ui-classes.json JSON format class list
*-classes.json Other component libraries

Configuration

Via Code

builder.Services.AddTailbreeze(options =>
{
    options.Mode = TailbreezeMode.Cdn;        // Cdn, Full, or Optimized
    options.TailwindVersion = "4";            // "latest", "3", "4", or "3.4.17"
    options.InputCssPath = "Styles/app.css";
    options.OutputCssPath = "css/app.css";
    options.EnableHotReload = true;
    options.AutoDetectComponentLibraries = true;
});

Via appsettings.json

{
  "Tailbreeze": {
    "Mode": "Cdn",
    "TailwindVersion": "4",
    "InputCssPath": "Styles/app.css",
    "OutputCssPath": "css/app.css",
    "EnableHotReload": true
  }
}

Configuration Options

Option Default Description
Mode Cdn Compilation mode: Cdn, Full, or Optimized
AutoDetectComponentLibraries true Auto-detect component library safelist files
ComponentLibraryClassFiles [] Explicit paths to class list files
TailwindVersion "latest" Version: "latest", "3", "4", or specific
InputCssPath "Styles/app.css" Source CSS file (relative to project root)
OutputCssPath "css/app.css" Output CSS file (relative to wwwroot)
ConfigPath "tailwind.config.js" Tailwind config file path
EnableHotReload true Enable watch mode in development
MinifyCss null Minify output (default: false in dev, true in prod)
AutoInstallCli true Auto-download CLI if missing
ServePath "/tailbreeze/app.css" URL path for serving CSS
UseCdnFallback null Fall back to CDN if CLI fails
ContentPaths [] Custom content paths (auto-detected if empty)

Version Support

TailwindVersion Downloads CSS Syntax
"latest" Latest stable from GitHub v4 (@import "tailwindcss")
"4" Latest v4.x stable v4 (@import "tailwindcss")
"3" v3.4.17 (LTS) v3 (@tailwind base/components/utilities)

Production Builds

For MSBuild integration (compile during dotnet build or dotnet publish):

dotnet add package Noundry.Tailbreeze.Build

The build package automatically:

  • Detects component library safelist files
  • Generates optimized CSS during build
  • Minifies CSS during publish

CLI Storage Location

The Tailwind CLI is downloaded once and cached at:

  • Windows: %LOCALAPPDATA%\Tailbreeze\cli\{version}\tailwindcss.exe
  • macOS/Linux: ~/.local/share/Tailbreeze/cli/{version}/tailwindcss

Troubleshooting

Classes not being applied

  1. In CDN mode: All classes should work - check browser console
  2. In Optimized mode: Check tailwind.config.js content paths
  3. Component library: Verify safelist file exists in project root

CLI download fails

  1. Check internet connectivity
  2. Try setting a custom CliDownloadUrl for corporate mirrors
  3. Manually download from https://github.com/tailwindlabs/tailwindcss/releases

License

MIT License - see LICENSE file.

Inspired by tailwind-dotnet by Kalleby Santos.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  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.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has 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.3.0 164 3/4/2026

See CHANGELOG.md for release notes.