# 📐 disposition
[](https://crates.io/crates/disposition)
[](https://docs.rs/disposition)
[](https://github.com/azriel91/disposition/actions/workflows/ci.yml)
[](https://codecov.io/gh/azriel91/disposition)
SVG diagram generator.
Playground: <https://azriel.im/disposition>.
> [!NOTE]
>
> 🚧 This crate is not yet stable.
>
> See design notes at <https://peace.mk/book/side_projects/disposition.html>.
## Features
<details open>
* [x] Pure Rust.
* [x] SVG for lossless resolution.
* [x] Stable layout.
* [x] Sensible default styling.
* [x] Customizable styling.
* [x] Interactive highlighting.
* [x] CSS only interactivity.
* [x] Edges between nodes.
* [x] Edge animations representing requests/responses.
* [x] Arrows on edges.
* [x] Circle as node shape.
* [x] Light and dark modes.
* [x] Dependencies between process steps.
* [ ] Tooltips.
* [ ] Images in nodes.
* [ ] Responsive layout.
</details>
## Usage
<details><summary>Library usage is a work in progress.</summary>
Add the following to `Cargo.toml`:
```toml
[dependencies]
disposition = "0.1.0"
```
In code:
```rust
use disposition;
todo!("Wait for the next version. Currently only the playground is usable.")
```
</details>
## Development
### Playground
Install `dx` (dioxus build tool):
```bash
cargo install cargo-binstall
cargo binstall dioxus-cli
```
Run `dx serve` in `app/playground`:
```bash
cd app/playground
dx serve
```
## License
Licensed under either of
* Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or https://www.apache.org/licenses/LICENSE-2.0)
* MIT license ([LICENSE-MIT](LICENSE-MIT) or https://opensource.org/licenses/MIT)
at your option.
### Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.