explaingit

facebook/yoga

📈 Trending18,739C++Audience · developerComplexity · 3/5ActiveLicenseSetup · moderate

TLDR

A layout engine that brings web browser flexbox rules to native apps, letting developers arrange UI elements consistently across platforms without a browser.

Mindmap

mindmap
  root((Yoga))
    What it does
      Calculates element positions
      Implements flexbox layout
      Cross-platform UI
    How it works
      C++ core engine
      Language bindings
      Browser-tested output
    Use cases
      Native mobile apps
      Desktop applications
      UI framework building
    Tech stack
      C++
      Flexbox standard
      HTML test fixtures

Things people build with this

USE CASE 1

Build native mobile apps with consistent flexbox-based layouts across iOS and Android.

USE CASE 2

Create desktop applications that use web-standard layout rules without embedding a browser.

USE CASE 3

Develop cross-platform UI frameworks that need predictable, standards-compliant positioning.

Tech stack

C++FlexboxChrome

Getting it running

Difficulty · moderate Time to first run · 30min

Requires C++ build toolchain and understanding of how to integrate the layout engine into a native app project.

Use freely for any purpose, including commercial use, as long as you keep the copyright notice and license text.

In plain English

Yoga is a layout engine, a piece of software that calculates where things should appear on screen, built to follow the same rules web browsers use for their flexbox layout system. Flexbox is the standard approach for arranging boxes, rows, and columns in modern user interfaces. Yoga lets developers use these same familiar layout rules in applications outside the browser, such as native mobile or desktop apps. The library is written in C++ and can be embedded into apps built in other languages through bindings. Its tests are generated from HTML fixtures that are rendered in Chrome to confirm the expected positions, so the output closely matches real browser behavior. Yoga is primarily useful for developers building cross-platform UI frameworks who want consistent, standards-based layout behavior without depending on a web browser at runtime.

Copy-paste prompts

Prompt 1
How do I integrate Yoga into my C++ mobile app to use flexbox layout rules?
Prompt 2
Show me how to use Yoga bindings in my language to position UI elements like a web browser would.
Prompt 3
What's the simplest way to add Yoga layout calculations to a native desktop application?
Open on GitHub → Explain another repo

Generated 2026-05-18 · Model: sonnet-4-6 · Verify against the repo before relying on details.