A declarative UI framework for iOS

ComponentKit is an Objective-C++ view framework for iOS that is heavily inspired by React.

ComponentKit Hero Logo
Declarative

Declarative

ComponentKit 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. With code generation, ComponentKit can perform optimizations for your UI under the hood, while keeping your code simple and easy to maintain.

Asynchronous Layout

ComponentKit can measure and layout your UI ahead of time without blocking the UI thread. By decoupling its layout system from UIKit, ComponentKit can drop the UI thread constraint.

Asynchronous Layout
Flatter View Hierarchies

Flatter View Hierarchies

ComponentKit uses Yoga for layout and automatically reduces the number of UIViews that your UI contains. This, in addition to ComponentKit's text optimizations, allows for much smaller view hierarchies and improves both memory and scroll performance.

Fine-grained Recycling

With ComponentKit, each UI item such as text, image, or video is recycled individually. As soon as an item goes off screen, it can be reused anywhere in the UI and pieced together with other items to create new UI elements. Such recycling reduces the need of having multiple view types and improves memory usage and scroll performance.

Declarative

Also available

Litho – A React-Inspired View Framework for Android

Litho takes a functional, declarative approach to building UI.

Learn More
Litho