# Struct ui::Modal

> A modal: up to five labelled inputs and texts.

`zaun_client::ui::Modal` · Struct

```rust
pub struct Modal { … }
```

A modal: up to five labelled inputs and texts.

## Fields

### `custom_id: String`

Its `custom_id`.

### `title: String`

Its title.

### `components: Vec<Component>`

Its labels and texts.

## Methods

### `new`

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

An empty modal.

### `field`

```rust
pub fn field<impl Into<String>>(self, label: impl Into<String>, input: Component) -> Self
```

Adds any input (radio, checkbox, file upload, …) under `label`.

### `input`

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

Adds a text field under `label`.

### `select`

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

Adds a select under `label`.

### `text`

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

Adds markdown text.

## Trait implementations

`Clone`, `Debug`

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