# server.interactive.MenuItem

- **Module:** server.interactive
- **Package:** libtmux
- **Language:** Rust
- **Kind:** struct
- **Source:** https://github.com/libtmux/libtmux-rs/blob/f0e37052c232636b61d095817046e6bfc8f2ca40/crates/libtmux/src/server/interactive.rs#L226
- **Page:** https://libtmux.org/en/rs/latest/reference/server-interactive-menuitem/

One line of a [`Server::display_menu`] menu.

The three parts were a `(String, String, String)` triple, which reads the
same whichever order they are in and compiles whichever order they are in.

## Example

```rust
use libtmux::MenuItem;

server
    .display_menu(
        None,
        "session",
        [
            MenuItem::new("Detach", "d", "detach-client"),
            MenuItem::new("Kill", "k", "kill-session"),
        ],
    )
    .await?;
```

## Members

- `new` (method): Show `label`, and run `command` when the person presses `key`.
- `label` (method): The text tmux shows.
- `key` (method): The key that chooses this line.
- `command` (method): The tmux command this line runs.
