DioxusLabs/taffy
A high performance rust-powered UI layout library
Featured achievements
The project's latest awards
#1 Repository of the week
#1 Repository of the week
#1 Repository of the week
⚡ CSS layout, decoupled from a browser
A shared Rust engine for Flexbox, Grid, and Block layout
Taffy is a flexible, high-performance, cross-platform UI layout library written in Rust. It implements the CSS Block, Flexbox, and CSS Grid layout algorithms and is built to be used as a dependency for other UI and GUI libraries, not a full GUI toolkit by itself.
✨ Highlights
- Three core CSS algorithms: Implements Block, Flexbox, and CSS Grid layout with more paradigms planned per its roadmap.
- Tree-based Rust API: Build a
TaffyTree, create leaves/children withStyle, callcompute_layout, and read computed sizes fromTaffyTree.layout. - Adopted across many toolkits: Powers Servo, Blitz, Bevy, Takumi, iocraft, Slint, Lapce (via Floem), and Zed (via GPUI).
- Web-aligned semantics: Follows CSS Flexbox and Grid specs closely, so MDN and CSS-Tricks guides translate to Taffy's model.
- Multi-language access: Python bindings via stretchable, with WIP C and WASM bindings.
- Measured performance: Benchmarked against Yoga with layout-only comparisons using criterion.
💡 Why it matters
Taffy splits layout out as reusable infrastructure. Instead of each UI toolkit reimplementing Flexbox or Grid, they can embed one standards-aligned engine and focus on rendering, input, or their own widget model. With use in browsers, game engines, terminals, and text editors, it acts as shared CSS-layout machinery for non-browser UIs.
#Rust #UI #Flexbox #CSSGrid #Layout #TiniX
Similar Projects
Discover other similar projects and AI models.
all-MiniLM-L6-v2 This is a sentence-transformers(https://www.SBERT.net) model: It maps sentences & paragraphs to a 384 dimensional dense vector space and can be used for tasks like clustering or semantic search. Usage (Sentence-Transformers) Using t...
Open source, composable payments platform | PCI compliant | SaaS and Self-host options | Enables connectivity to multiple payment, payout, fraud, vault and tokenization providers | Uplifts authorization with intelligent routing and revenue recovery | Reduce payment processing costs with cost observability | Reduces payment ops with reconciliation
A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode,DeepSeek Harness and more. Only official website: ccswitch.io
An open-source remote desktop application designed for self-hosting, as an alternative to TeamViewer.