HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
DioxusLabs
taffy
Rust2022–2026
DioxusLabs / taffy

taffy

A high performance rust-powered UI layout library

6Distinct people
24Mentions
0Explicit recommenders
3.8KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

A high performance rust-powered UI layout library

GitHub

Where it is used

No documented product use was verified in the last source check.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

Mentioned in the same Hacker News threads. That is not proof they are substitutes.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 3:56:07 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year24 dated mentions

Observed mentions: 2022-06-15 09:00:34 UTC to 2026-08-13 14:56:15 UTC.

0369122022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 2 mentions; 1 submissions, 1 comments20222023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 11 mentions; 1 submissions, 10 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 6 mentions; 0 submissions, 6 comments20242025-01-01 00:00:00 UTC to 2026-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2026-01-01 00:00:00 UTC to 2027-01-01 00:00:00 UTC (exclusive): 3 mentions; 1 submissions, 2 comments. Incomplete calendar period.2026*

* An incomplete calendar period is marked with an outlined bar. Its count is not directly comparable with a full period.

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC211
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC11110
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC606
20252025-01-01 00:00:00 UTC2026-01-01 00:00:00 UTC202
2026 (partial)2026-01-01 00:00:00 UTC2027-01-01 00:00:00 UTC312

What Hacker News says

24 sources
I see you're using html5ever for HTML parsing, and like it's trait/callback based API (me too). It looks like style/layout is not in scope at the moment, but if you're ever looking at adding style/layout capabilities to lightpanda, then you may find it useful to know that Stylo [0] (CSS / style system) and Taffy [1] (box-level layout) are both avaiable with a similar style of API (also Parley [2] which has a slightly different API style but can be combined with Taffy to implement inline/text layout). [0]: https://github.com/servo/stylo [1]: https://github.com/DioxusLabs/taffy [2]: https://github.com/linebender/parley --- Also, if you're interested in contributing C bindings for html5ever upstream then let me know / maybe open a github issue.
In Lightpanda migrate DOM implementation to Zig
If you don't need JavaScript, then you might be interested in https://github.com/DioxusLabs/blitz. It pulls in Servo/Firefox's CSS engine Stylo (and Servo's HTML parser html5ever) and pairs it with our own layout engine (which we are implementing mostly as libraries: Taffy [0] for box-level layout and Parley [1] for text/inline layout) and DOM implementation. Rendering and networking are abstracted behind traits (with default implementations available) and you can drive it using your own event loop. Minimal binary sizes are around 5mb (although more typical build would be more like 10-15mb). [0]: https://github.com/DioxusLabs/taffy [1]: https://github.com/linebender/parley
In Servo v0.0.1
> The current roadmap lists Shadow DOM and CSS Grid as priorities I've been working on the CSS Grid support. About to land "named grid lines and areas" support which should make a bunch more websites layout correctly. I'm biased because it's my project, but IMO the approach Servo is using for CSS Grid is pretty cool in that the actual implementation is in an external library (Taffy [0]) that can be used standalone and is widely used accross the Rust UI ecosystem, including in the Blitz [1] web engine (which also uses Taffy for Flexbox and Block layout), the Zed [2] text editor, and the Bevy [3] game engine. I'm hopeful that this approach of breaking down a web engine into independently usable modules with public APIs (which builds upon Servo's earlier work on modular libraries such as Stylo and html5ever) will make it easier for people to
Read the rest
get involved in web engine development (as they can understand each piece in isolation), and make it easier for people to create new web engines in future (as they won't have to start completely from scratch). [0]: https://github.com/DioxusLabs/taffy [1]: https://github.com/DioxusLabs/blitz [2]: https://zed.dev [3]: https://bevy.org/
In I tried Servo
Cool! I also have a standalone implementation of CSS Grid [1]. Implemented in Rust in my case (and we also support Flexbox and Block layout). Looks like the licenses are both MIT (although you may want to add a LICENSE file to make that easier to find) so feel free to steal bits if you want. We aim to be fully web compatible, although we're not quite there yet. One thing we have that you may be particularly interested is a reasonably substantial test suite. The tests are defined as HTML snippets that we run through Chrome using webdriver in order the scrape (hopefully) correct assertions, and then format into pure-code unit tests. If you wanted to you could write your own test generator and reuse our snippets. (this test infrastructure is also partially shared with Yoga [2], the C++ Flexbox implementation that powers React Native) 1: http
Read the rest
In Clay – UI Layout Library
> Create native applications that use the widely popular HTML/CSS paradigm for layout, but leave out much of the heavyweight stuff that a full JS/DOM/browser API implies. This looks like it can enable very large improvements over packaging browser engines like electron etc That's pretty much the pitch! > Some of the stories they told, like having to prerender and dynamically measure web pages in order to achieve some very simple layout relationships hit right at home. > Writing CSS feels, as Muratori said, more like presenting a case in the court of law, instead of building upon simple primitives > Perhaps the authors can find inspiration by looking at CSS houdini, which tries to make CSS extensible Pluggable layout algorithms are definitely something I'd like to enable in Blitz. I suspect JS for layout will be too slow in most cases. Bu
Read the rest
t this is an area in which we have an advantage with our API being in Rust. And our layout engine Taffy (https://github.com/DioxusLabs/taffy) is already highly modular. Custom widgets would go beyond just layout and allow for fully custom layout, paint, accessibility, event handling, etc similar to a widget in a traditional GUI toolkit like GTK or Cocoa. I also have a proposal to add a new unit to CSS itself (inspired by how many non-web UI systems do layout), which has the potential to greatly simplify web layout in the common cases https://github.com/w3c/csswg-drafts/issues/8267. It's been on the back burner for a bit, but I should really get back to it at some point (I really want to actually implement the algorithms).
In Blitz: A lightweight, modular, extensible web renderer
The one thing I'd really like for web layout is a "stretch unit" that works similarly to CSS Grid's fr units in that it would be defined as "taking up a proportion of available space after other siblings have been sized" except: - It would have no automatic minimum, so it would actually be equivalent to minmax(0, 1fr) (this would make it much more performant, avoiding the exponential time complexity of many existing CSS layout modes. - It could be used for the width/height properties (and potentially other places such as margin/padding/inset) If you had that along with a simplified 1-dimensional display mode (i.e. like flexbox except with the flexing disabled) then I think most people probably wouldn't want much more in most circumstances. Houdini is interesting, but as someone who has spent a lot of the last year implementing a web layou
Read the rest
t engine [0], I'm a little skeptical that JS is ever going to be fast enough to really compete with built-in layout modes. It could be an interesting use case for WASM if the problem of passing data into the WASM VM cheaply (perhaps by reference) can be solved. [0]: https://github.com/DioxusLabs/taffy
In Old CSS, new CSS (2020)
I maintain a standalone web layout engine[0] (currently implementing Flexbox and CSS Grid) which has no scripting support. WPT layout tests using <script> is a major blocker to us running WPT tests against our library. Yoga (used by React Native) is in a similar position. Do you think the WPT would accept pull requests replacing such tests with equivalent tests that don't use <script> (perhaps using a build script to generate multiple tests instead - or simply writing out the tests longhand)? I could run against only the ref-tests, but if I can't get full coverage then the WPT seems to provide little value over our own test suite. [0]: https://github.com/DioxusLabs/taffy
In Show HN: Dropflow, a CSS layout engine for node or
> Is there any easy to use/hack HTML layouting engine where I could experiment with custom CSS attributes and bridge that gap? Would anything from Servo be suitable? Servo could be used for this. You'd want to add support for parsing the CSS properties themselves to the style crate in https://github.com/servo/stylo and then the layout implementation to the layout2020 crate in https://github.com/servo/servo. You do effectively get a whole browser though. I'm currently working on building a lighter weight / hackable layout engine based on a combination of https://github.com/servo/stylo (for css parsing and selector resolution), https://github.com/DioxusLabs/taffy (for box-level layout) and https://github.com/pop-os/cosmic-text (for flow/inline layout). I expect to have something decent in around 6 months Neither of these setups currently ha
Read the rest
ve any support for pagination though.
In CSS for printing to paper
I maintain a web layout library that is designed to be integrated into other software: https://github.com/DioxusLabs/taffy It needs to be combined with a text layout engine (such as https://github.com/pop-os/cosmic-text), and it doesn't support everything yet (notable features that are currently missing: "float", "display: inline-block", "box-sizing: content-box", "position: static"). But we have Block, Flexbox and CSS Grid support with more on the way.
In I'm fed up with it, so I'm writing a browser
While there are a lot of Rust UI frameworks, none of them are really recommended for production use yet. I suspect a few of the will die off and work will coalesce a few once things mature a bit. Another nice feature of the Rust UI ecosystem is that lots of it is being built in a modular way. For example I maintain a layout engine [0] library which just does layout and can be easily integrated by anybody creating a UI library. And there a bunch of similar composable libraries covering rendering, text layout, accessibility, window creation, clipboard access, etc. [0]: https://github.com/DioxusLabs/taffy
In Show HN: Slint – A declarative UI toolkit for embedded and desktop
You might be interested in the combination of Taffy [0] which handles box-level browser layout (block, flexbox, grid, etc) and Cosmic Text [1] which handles text-level layout and basic text editing functionality. Integrating them into browsers while retaining accessibility could be tricky. But in they're general they're relatively small standalone libraries implementing most of the layout algorithms that browsers implement (although there are currently a few key missing features like laying out "inline-block" items in line with text). [0]: https://github.com/DioxusLabs/taffy [1]: https://github.com/pop-os/cosmic-text
In Conflict-Driven Synthesis for Layout Engines

Showing the 15 most recent of 24 sources. Enable JavaScript to search and browse every indexed mention.

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.