23 releases (13 breaking)
| 0.16.0 |
|
|---|---|
| 0.14.0 | Sep 26, 2025 |
#645 in FFI
204 downloads per month
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