Skip to content
  1. Docs
  2. enzUI framework
  3. Developers

Your first app

Run the enzUI example and follow an edit from the text field to the application state.

The enzUI Alpha 0.3 release includes a small notes app with a sidebar, an editor and appearance controls. Clone the tagged release, then run this from its root:

sh
cargo run --locked --example app

Open the example source alongside the app. The example keeps its notes in memory for the current session.

Follow an edit

  1. Change a note’s title. The text field emits Message::Rename(String).
  2. App::update assigns the new title to the selected note.
  3. App::view rebuilds the editor and sidebar from that state. The titlebar and sidebar use the note’s label, which shows Untitled when the title is empty.

New note creates an empty note and selects it. Selecting a note from an overlay sidebar hides the sidebar. Narrow the window to try that layout.

Follow a theme change

App::new boots ThemeIntegration. The application forwards theme events from its subscription to update, then returns the resulting iced theme from its theme callback. Switch between Light, Dark and System to see the app-level override and shared desktop preferences.

Next steps