# Struct TextInput

> Builds a `types::TextInput` for a modal.

`zaun_bot::TextInput` · Struct

```rust
pub struct TextInput(…)
```

Builds a `types::TextInput` for a modal.

## Methods

### `short`

```rust
pub fn short<impl Into<String>>(custom_id: impl Into<String>) -> Self
```

A one-line input.

### `paragraph`

```rust
pub fn paragraph<impl Into<String>>(custom_id: impl Into<String>) -> Self
```

A multi-line input.

### `length`

```rust
pub fn length(self, min: u16, max: u16) -> Self
```

Length bounds (0–4 000).

### `required`

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

Whether it must be filled (default true).

### `placeholder`

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

Placeholder (≤ 100).

### `value`

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

Pre-filled value.

## Trait implementations

`Clone`, `Debug`

[Full rustdoc page](/docs/api/rust/zaun-bot/zaun_bot/modal/struct.TextInput.html)
