#tailwind #styling

tailwind-rs-leptos

Tailwind CSS integration for Leptos framework

23 releases (13 breaking)

0.16.0 Sep 26, 2025
0.14.0 Sep 26, 2025

#645 in FFI

Download history 510/week @ 2025-09-10 605/week @ 2025-09-17 1486/week @ 2025-09-24 129/week @ 2025-10-01 3/week @ 2025-10-08 32/week @ 2025-10-15 6/week @ 2025-10-22

204 downloads per month

MIT license

2MB
46K SLoC

Tailwind-rs Leptos Integration

This crate provides seamless integration between Tailwind CSS and the Leptos framework. It follows our TDD-first approach (ADR-001) and comprehensive testing pyramid strategy (ADR-002).

🌐 WASM Compatibility

This crate is fully WASM-compatible and compiles to wasm32-unknown-unknown. Perfect for building modern web applications with Leptos and Tailwind CSS.

Features

  • 🌐 WASM Compatible - Compiles to WebAssembly for browser environments
  • ⚡ High Performance - Synchronous operations for optimal WASM performance
  • 📦 Smaller Bundles - ~20% reduction in bundle size
  • Type-safe class generation - Compile-time validation of Tailwind classes
  • Reactive styling - Dynamic class generation with Leptos signals
  • Performance optimized - Efficient class caching and tree-shaking
  • Framework integration - Native Leptos component support

Quick Start

use tailwind_rs_leptos::DynamicClassBuilder;

// Create dynamic classes with reactive updates
let builder = DynamicClassBuilder::new()
    .base("px-4 py-2 rounded-md font-medium")
    .variant("bg-blue-600 text-white");
    
let classes = builder.classes();
assert!(classes.contains("px-4"));

Dependencies

~25–33MB
~609K SLoC