Skip to content
Go to file

Latest commit

Summary: We're creating Spec file model to analyse errors. We can use this model to try generating file along the way.

Reviewed By: cute-jumper

Differential Revision: D22819938

fbshipit-source-id: 4cae5818636d80b4e6e869112ab3205a06a17381


Failed to load latest commit information.

Litho CircleCI Bintray Join the chat at

Litho is a declarative framework for building efficient UIs on Android.

  • Declarative: Litho uses a declarative API to define UI components. You simply describe the layout for your UI based on a set of immutable inputs and the framework takes care of the rest.
  • Asynchronous layout: Litho can measure and layout your UI ahead of time without blocking the UI thread.
  • View flattening: Litho uses Yoga for layout and automatically reduces the number of ViewGroups that your UI contains.
  • Fine-grained recycling: Any component such as a text or image can be recycled and reused anywhere in the UI.

To get started, check out these links:


Litho can be integrated either in Gradle or Buck projects. Read our Getting Started guide for installation instructions.

Quick start

1. Initialize SoLoader in your Application class.

public class SampleApplication extends Application {
  public void onCreate() {
    SoLoader.init(this, false);

2. Create and display a component in your Activity

public void onCreate(Bundle savedInstanceState) {

    final ComponentContext c = new ComponentContext(this);

    final Component component = Text.create(c)
        .text("Hello World")

    setContentView(LithoView.create(c, component));

Run sample

You can find more examples in our sample app.

To build and run (on an attached device/emulator) the sample app, execute

$ buck fetch sample
$ buck install -r sample

or, if you prefer Gradle,

$ ./gradlew :sample:installDebug


Before contributing to Litho, please first read the Code of Conduct that we expect project participants to adhere to.

For pull requests, please see our CONTRIBUTING guide.

See our issues page for ideas on how to contribute or to let us know of any problems.

Please also read our Coding Style and Code of Conduct before you contribute.

Getting Help

  • Post on StackOverflow using the #litho tag.
  • Chat with us on Gitter.
  • Join our Facebook Group to stay up-to-date with announcements.
  • Please open GitHub issues only if you suspect a bug in the framework or have a feature request and not for general questions.


Litho is licensed under the Apache 2.0 License.

You can’t perform that action at this time.