Need help with yoga?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

14.7K Stars 1.2K Forks Other 2.0K Commits 319 Opened issues


Yoga is a cross-platform layout engine which implements Flexbox. Follow for updates.

Services available


Need anything else?

Contributors list

Yoga CocoaPods npm bintray NuGet


Yoga builds with buck. Make sure you install buck before contributing to Yoga. Yoga's main implementation is in C++, with bindings to supported languages and frameworks. When making changes to Yoga please ensure the changes are also propagated to these bindings when applicable.


For testing we rely on gtest as a submodule. After cloning Yoga run

git submodule init
followed by
git submodule update

For any changes you make you should ensure that all the tests are passing. In case you make any fixes or additions to the library please also add tests for that change to ensure we don't break anything in the future. Tests are located in the

directory. Run the tests by executing
buck test //:yoga

Instead of manually writing a test which ensures parity with web implementations of Flexbox you can run

to generate a test for you. You can write html which you want to verify in Yoga, in
folder, such as the following.


to generate test code and re-run
buck test //:yoga
to validate the behavior. One test case will be generated for every root
in the input html.

You may need to install the latest watir-webdriver gem (

gem install watir-webdriver
) and ChromeDriver to run
Ruby script.


.NET testing is not integrated in buck yet, you might need to set up .NET testing environment. We have a script which to launch C# test on macOS,



Benchmarks are located in

and can be run with
buck run //benchmark:benchmark
. If you think your change has affected performance please run this before and after your change to validate that nothing has regressed. Benchmarks are run on every commit in CI.


Installing through NPM

npm install yoga-layout
By default this will install the library and try to build for all platforms (node, browser asm, and standalone webpack). You may receive errors if you do not have the required platform development tools already installed. To preset the platform you'd like to build for you can set a .npmrc property first.
npm config set yoga-layout:platform standalone
This will now only run the standalone webpack build upon install.

Build Platforms

| name | description | |----------------|-------------------------------------------------| | all (default) | Builds all of these platforms. | | browser | Builds asm js browser version. | | node | Builds node js version. | | standalone | Runs webpack. | | none | Does nothing. You can use the prepackaged libs. |

Maintainer Release Guide

To publish a new release, follow these steps:

  1. Ensure you have your GPG key set up and your OSS Sonatype credentials handy.
  2. Add the follow entries to either your local
    (don't forget to revert) or your global
# You get these from;User%20Token

You can get the keyId (in GPG 1.4 format) by running gpg1 --list-keys.

signing.secretKeyRingFile= signing.keyId= signing.password=

  1. Change the
    to a non-SNAPSHOT release.
  2. Commit and land the version change.
  3. Run
    ./gradlew publishToMaven
  4. Run
    ./gradlew closeAndReleaseRepository
  5. Change the
    back to a new SNAPSHOT release.
  6. Commit and land the version change.
  7. Celebrate! You've made a release!

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.