diff --git a/.assets/exemplaris.png b/.assets/exemplaris.png new file mode 100644 index 0000000..910ca53 Binary files /dev/null and b/.assets/exemplaris.png differ diff --git a/README.md b/README.md index 689a615..3e69151 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,36 @@ +

Example

+ + +
Container::default()
+  .with_size(size!(100%, 50%))
+  .with_align(Alignment::Center)
+  .with_padding(5.)
+  .with_gap(10.)
+  .with_corner_radius(10.)
+  .with_background(color::WHITE)
+  .with_children(|ui| {
+    Text::default()
+      .with_text("Hello, world")
+      .with_text_size(100)
+      .with_color(color::BLACK)
+      .add_child(ui);
+    Container::default()
+      .with_padding((10., 20.))
+      .with_corner_radius((2.5, 30., 2.5, 2.5))
+      .with_background(color::DARK_RED)
+      .with_children(|ui| {
+        Text::default()
+          .with_text("Lorem ipsum dolor sit amet, consectetur adipiscing elit.")
+          .with_text_size(24)
+          .add_child(ui);
+      })
+      .add_child(ui);
+  })
+  .add_root(&mut hui, resolution);
+

Backends

Latest stable release: