# Struct ui::Button

> A button: one that sends an interaction (`custom_id`), or a link the reader confirms.

`zaun_client::ui::Button` · Struct

```rust
pub struct Button(…)
```

A button: one that sends an interaction (`custom_id`), or a link the reader confirms.

## Methods

### `primary`

```rust
pub fn primary<impl Into<String>, impl Into<String>>(custom_id: impl Into<String>, label: impl Into<String>) -> Self
```

A blue button.

### `secondary`

```rust
pub fn secondary<impl Into<String>, impl Into<String>>(custom_id: impl Into<String>, label: impl Into<String>) -> Self
```

A grey button.

### `success`

```rust
pub fn success<impl Into<String>, impl Into<String>>(custom_id: impl Into<String>, label: impl Into<String>) -> Self
```

A green button.

### `danger`

```rust
pub fn danger<impl Into<String>, impl Into<String>>(custom_id: impl Into<String>, label: impl Into<String>) -> Self
```

A red button.

### `link`

```rust
pub fn link<impl Into<String>, impl Into<String>>(url: impl Into<String>, label: impl Into<String>) -> Self
```

A link (`https://` only); readers confirm before it opens.

### `emoji`

```rust
pub fn emoji<impl Into<String>>(self, emoji: impl Into<String>) -> Self
```

Adds a Unicode emoji.

### `disabled`

```rust
pub const fn disabled(self, disabled: bool) -> Self
```

Shown but not clickable.

### `build`

```rust
pub fn build(self) -> Component
```

The component.

## Trait implementations

`Clone`, `Debug`, `Eq`, `PartialEq`, `StructuralPartialEq`

[Full rustdoc page](/docs/api/rust/zaun-client/zaun_client/ui/button/struct.Button.html)
