#ui #built #hook #documentation #3d #ambient-element

ambient_ui

A UI library for the Ambient runtime, built on top of Ambient's Element library

16 releases

0.3.1 Oct 25, 2023
0.3.1-rc.1 Oct 24, 2023
0.3.0-rc.2 Sep 29, 2023
0.2.1 May 6, 2023

#952 in GUI

Download history 48/week @ 2025-10-07 58/week @ 2025-10-14 52/week @ 2025-10-21 37/week @ 2025-10-28 30/week @ 2025-11-04 25/week @ 2025-11-11 29/week @ 2025-11-18 28/week @ 2025-11-25 37/week @ 2025-12-02 22/week @ 2025-12-09 28/week @ 2025-12-16 37/week @ 2025-12-23 21/week @ 2025-12-30 9/week @ 2026-01-06 17/week @ 2026-01-13 31/week @ 2026-01-20

86 downloads per month
Used in 15 crates (2 directly)

MIT/Apache

365KB
9K SLoC

A UI library for Ambient. Built on top of ambient_element.

Ambient's UI system is heavily inspired by React (with hooks), and follows many of the same patterns. Take a look at the React documentation to learn how hooks work in general.

Getting started

Here's a minimal, complete example of a counter app:

use ambient_api::prelude::*;

#[element_component]
fn App(hooks: &mut Hooks) -> Element {
    let (count, set_count) = use_state(hooks,0);
    FlowColumn::el([
        Text::el(format!("We've counted to {count} now")),
        Button::new("Increase", move |_| set_count(count + 1)).el(),
    ])
}

#[main]
pub fn main() {
    App.el().spawn_interactive();
}

See all UI examples here.


ambient_ui

A UI library for Ambient. Built on top of ambient_element.

Ambient's UI system is heavily inspired by React (with hooks), and follows many of the same patterns. Take a look at the React documentation to learn how hooks work in general.

Dependencies

~18–66MB
~1M SLoC