/** * Copyright (c) 2014-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * * @flow * @format */ import {Button} from 'antd'; import React from 'react'; import Page from '../components/Page'; import Padded from '../components/Padded'; import Playground from '../components/Playground'; import {Row, Col} from 'antd'; import './index.css'; import ReactNativeLogo from './logos/reactnative.png'; import LithoLogo from './logos/litho.png'; import ComponentKitLogo from './logos/componentkit.png'; import Link from 'gatsby-link'; import Footer from '../components/Footer'; const playgroundInitialState = { "width":500, "height":500, "alignItems":1, "padding":{ "top":"20", "right":"20", "bottom":"20", "left":"20" }, "children":[ { "width":100, "height":100, "minWidth":null, "maxWidth":null, "minHeight":null, "maxHeight":null }, { "width":100, "height":100, "margin":{ "right":"20", "left":"20" }, "flexGrow":"1", "minWidth":null, "maxWidth":null, "minHeight":null, "maxHeight":null }, { "width":100, "height":100, "minWidth":null, "maxWidth":null, "minHeight":null, "maxHeight":null } ], "minWidth":null, "maxWidth":null, "minHeight":null, "maxHeight":null }; const HeroSection = () => (

INTRODUCING

Flexible Layouts
with Yoga

Build flexible layouts on any platform with a highly optimized open source layout engine designed with speed, size, and ease of use in mind.

); const PlaygroundSection = () => ( ); const AboutSectionOne = () => (

Open Source Adoption

Yoga already powers widely used open source frameworks. It enables these frameworks to offer a simple and intuitive layout API that allows for engineers to collaborate more easily across platforms. Yoga has unlocked exciting features such as calculating layouts off of the main thread to help ensure smooth UI performance.

); const AboutSectionTwo = () => (

Why You May Consider Yoga

PERFORMANCE

Yoga was built to be fast and performance will always be one of Yoga's primary goals. For a layout engine to be able to power any range of applications, it needs to be fast and never stand in the way of a fluid user experience.

CROSS PLATFORM

Yoga is built with cross platform in mind. To ensure Yoga can be used anywhere, it was written in portable C/C++ and has a low number of dependencies and small binary size. This means Yoga can be used on iOS and Android, sharing knowledge, and potentially code, between platforms.

EASY TO LEARN

Yoga is easy to pick up and learn. The interactive documentation pages and a fully fledged layout editor makes it easy to play and learn all the features. If used with any of the major UI frameworks the layout editor even provides code generation.

); export default () => (