██████╗ ████████╗███╗ ██╗██╗███████╗██╗ ██╗
██╔══██╗╚══██╔══╝████╗ ██║██║██╔════╝╚██╗ ██╔╝
██████╔╝ ██║ ██╔██╗ ██║██║█████╗ ╚████╔╝
██╔══██╗ ██║ ██║╚██╗██║██║██╔══╝ ╚██╔╝
██████╔╝ ██║ ██║ ╚████║██║██║ ██║
╚═════╝ ╚═╝ ╚═╝ ╚═══╝╚═╝╚═╝ ╚═╝
---------------------------------------------------
rust library to simplify allowing user input over the web
[](https://opensource.org/licenses/MIT)

[](https://docs.rs/btnify)
> Hosts a website with buttons for you so you can focus on what matters!
Btnify is a small library that lets you host a website with some buttons that will call a function or closure
when clicked. Under the hood, Btnify uses [Axum](https://github.com/tokio-rs/axum). This library is pretty simple,
but it works, and it's open source! Please leave a pull request with any improvements you have :) I would appreciate it
very much.
## Installation
Run `cargo add btnify`
or
Add `btnify = "2.0.2"` to your `Cargo.toml`
## How to use
[Docs are here](https://docs.rs/btnify)
## Examples
Hello World
```rust
use btnify::button::{Button, ButtonResponse};
fn greet_handler() -> ButtonResponse {
ButtonResponse::from("hello world!")
}
// this button doesn't use any state so we will mark the state generic as unit
let greet_button: Button<()> = Button::create_basic_button("Greet!", Box::new(greet_handler));
```
Hello World 2.0
```rust
use btnify::button::{Button, ButtonResponse};
fn better_greet_handler(responses: Vec