Skip to content

Commit

Permalink
Explain DOM.
Browse files Browse the repository at this point in the history
  • Loading branch information
colinrtwhite committed Dec 13, 2023
1 parent 9d46d2d commit cd545e3
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions redwood-layout-schema/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@ widgets. It provides widgets for:
- `Box`: Lays widgets out along the Z axis (on top of eachother).
- `Spacer`: Adds space between widgets.

Internally the layout system uses a common layout engine written in Kotlin Multiplatform to support
consistent rendering across platforms. The system provides widget bindings for for Android
Views (`redwood-layout-view`), iOS UiKit (`redwood-layout-uiview`), and Compose
UI (`redwood-layout-composeui`).
Internally the layout system uses a common layout engine written in Kotlin Multiplatform. The
layout engine operates on a virtual DOM (document object model) composed of simple nodes
where each node is mapped to a widget in the real DOM. This lets the layout engine perform
operations on the DOM with consistent rendering across platforms. The system provides widget
bindings for for Android Views (`redwood-layout-view`), iOS UiKit (`redwood-layout-uiview`), and
Compose UI (`redwood-layout-composeui`).

## Widgets

Expand Down Expand Up @@ -49,7 +51,8 @@ Column {

### Box

Lays widgets out along the Z axis (on top of eachother).
Lays widgets out along the Z axis (on top of eachother). Widgets are laid from lowest Z index
(first) to highest Z index (last).

```kotlin
Box {
Expand Down

0 comments on commit cd545e3

Please sign in to comment.