# `Jido.Chat.Modal.Element`
[🔗](https://github.com/agentjido/jido_chat/blob/v1.2.0/lib/jido/chat/modal/element.ex#L1)

Canonical modal element used by `Jido.Chat.Modal`.

Validation enforces portable input rules. Provider length and option-count
limits belong to each adapter renderer.

# `input`

```elixir
@type input() :: t() | map()
```

# `t`

```elixir
@type t() :: %Jido.Chat.Modal.Element{
  fallback_text: nil | nil | binary(),
  help_text: nil | nil | binary(),
  id: binary(),
  kind:
    :text_input
    | :date_input
    | :number_input
    | :select
    | :radio_select
    | :external_select
    | :select_option
    | :option_group,
  label: nil | nil | binary(),
  max_date: nil | nil | binary(),
  max_length: nil | nil | integer(),
  max_value: nil | nil | number(),
  metadata: map(),
  min_date: nil | nil | binary(),
  min_length: nil | nil | integer(),
  min_query_length: nil | nil | integer(),
  min_value: nil | nil | number(),
  multiline: boolean(),
  option_groups: [any()],
  options: [any()],
  options_source: nil | nil | :static | :external | :dynamic,
  placeholder: nil | nil | binary(),
  required: boolean(),
  step: nil | nil | number(),
  timeout_ms: nil | nil | integer(),
  value: nil | nil | binary()
}
```

# `from_map`

```elixir
@spec from_map(map()) :: t()
```

Builds a modal element from serialized data.

# `new`

```elixir
@spec new(t() | map()) :: t()
```

Creates a canonical modal element.

# `normalize`

```elixir
@spec normalize(input()) :: t()
```

Normalizes modal element input.

# `schema`

Returns the schema for modal elements.

# `to_map`

```elixir
@spec to_map(t()) :: map()
```

Serializes the modal element into a plain map with a type marker.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
