---
title: Getting Started
order: 1
section: guide
tagline: Install euv, compose zero-context reactive UIs with view! and newline-separated style!, and target all 7 platforms from one Rust codebase.
---
## Install
```shell
cargo add euv euv-ui
```
## Minimal Cross-Platform App
Define event handlers and reactive text closures as sibling `let` bindings (or outer helper functions) before `view!`, and place each rule inside `style!` on its own line without semicolons:
```rust
use {euv::*, euv_ui::*};
pub fn run() -> Result<(), PlatformError> {
let mut window: WindowConfig = WindowConfig::default();
window
.set_title("Hello euv".to_string())
.set_size(1024, 720)
.set_render(RenderConfig::default());
let mut config: AppConfig = AppConfig::default();
config.set_window(window);
let mut app: App = App::new(config)?;
let count: Signal<i32> = Signal::new(0);
let tokens: ThemeTokens = ThemeTokens::resolve(DesignScheme::Shadcn, ThemeMode::Light);
let _: NodeId = app.mount(move || {
let p: ThemePalette = tokens.get_palette();
let container_style: Style = style! {
FlexDirection::Column
Overflow::Hidden
Width(Length::Percent(100.0))
Padding(Edges::all(SPACE_LG))
Gap(SPACE_MD)
Background(p.get_background())
};
let count_text = move || -> String { format!("Count: {}", count.get()) };
let on_increment = move |_: &UiEvent| {
let _: bool = count.set(count.get_untracked() + 1);
};
let text_style: Style = style! {
Width(Length::Percent(100.0))
FontSize(18.0)
FontWeight::SemiBold
TextColor(p.get_foreground())
};
view! {
view {
style: container_style
text {
style: text_style
{ count_text }
}
EuvButton {
label: "Increment"
tokens: tokens
on_click: on_increment
}
}
}
});
let _: FrameStats = app.run_frames(Some(1))?;
Ok(())
}
```
## IDE Go-to-Definition & Formatting
- **`Cmd+Click` / `F12` in `view!` & `style!`**: Built-in element tags (`column`, `row`, `text`, `input`, `canvas`, etc.) and properties jump directly to their re-exported schema docs (`euv::ColumnElement`, `euv::TextElement`, `euv::StyleProps`). Custom component names (`EuvButton`, `EuvCard`, etc.) jump directly to the component struct definition.
- **Formatting**: Run `cargo run -p euv-cli -- fmt` followed by `cargo fmt --all` to normalize both Rust code and all `view!` / `style!` / `var!` / `watch!` / `computed!` / `on!` / `emit!` / `state!` macro blocks idempotently.