ποΈ Declarative UI
Ribir uses a declarative DSL (Domain Specific Language) based on Rust macros to define the user interface. This allows you to describe what the UI should look like, rather than how to construct it step-by-step.
ποΈ Widget System
Ribir's widget system is built on three core traits: Render, Compose, and ComposeChild. Understanding these traits is key to creating custom widgets and understanding how Ribir constructs the UI tree.
ποΈ Built-in Attributes & FatObj
Ribir provides a powerful built-in attribute system that allows you to add common functionality to any Widget, such as layout control (margin, alignment), visual effects (background, border, opacity, transform), and interaction events (ontap, onhover). These features are not implemented individually by each Widget, but are provided through a universal wrapper called FatObj.
ποΈ State Management
Ribir uses a data-driven approach to state management. Instead of manually updating widgets, you modify the data (state), and Ribir automatically updates the parts of the UI that depend on that data.
ποΈ Data Sharing & Events
Ribir provides mechanisms to share data across the widget tree and handle communication between widgets efficiently.
ποΈ Layout System
Ribir's layout system uses a "Constraints Down, Size Up" single-pass model. This is very similar to Flutter's layout model and aims to achieve efficient and flexible UI layout.