# Vertigo A reactive Real-DOM library with SSR for Rust [![crates.io](https://img.shields.io/crates/v/vertigo)](https://crates.io/crates/vertigo) [![Documentation](https://docs.rs/vertigo/badge.svg)](https://docs.rs/vertigo) ![MIT or Apache 2.0 licensed](https://img.shields.io/crates/l/vertigo.svg) [![Dependency Status](https://deps.rs/crate/vertigo/0.6.0/status.svg)](https://deps.rs/crate/vertigo/0.6.0) [![CI](https://github.com/vertigo-web/vertigo/actions/workflows/pipeline.yaml/badge.svg)](https://github.com/vertigo-web/vertigo/actions/workflows/pipeline.yaml) [![downloads](https://img.shields.io/crates/d/vertigo.svg)](https://crates.io/crates/vertigo) ## Features * **Reactive dependencies** - A graph of values and clients (micro-subscriptions) that can automatically compute what to refresh after one value change * **Real DOM** - No intermediate Virtual DOM mechanism is necessary * **HTML/CSS macros** - Allows to construct Real DOM nodes using HTML and CSS * **Server-side rendering** - Out of the box when using `vertigo-cli` See [Changelog](https://github.com/vertigo-web/vertigo/blob/master/CHANGES.md) for recent features. Go to **[TUTORIAL](https://github.com/vertigo-web/vertigo/blob/master/tutorial.md)** if you want to try. ## Examples Dependencies: ```toml vertigo = "0.6" ``` Example 1: ```rust use vertigo::{dom, DomNode, Value, bind, main}; #[main] pub fn app() -> DomNode { let count = Value::new(0); let increment = bind!(count, || { count.change(|value| { *value += 1; }); }); let decrement = bind!(count, || { count.change(|value| { *value -= 1; }); }); dom! {
"Counter: " { count }
"Message to the world: " { message }
} } #[main] fn app() -> DomNode { let message = Value::new("Hello world!".to_string()); let main_div = css!(" color: darkblue; "); dom! {