# `FrappeUIPhx.Components.TextInput`
[🔗](https://github.com/moacirbishopcamata/frappe_ui_phx/blob/v0.3.1/lib/frappe_ui_phx/components/text_input.ex#L1)

Campo de uma linha. Aceita `field={@form[:campo]}` (Phoenix/Ecto) ou
`name`/`value` avulsos. Restrições (`required`, `maxlength`, `min`, `pattern`,
`placeholder`...) vão direto ao `<input>`; o servidor continua sendo a
barreira real (o `required` aqui espelha a regra do changeset).

# `text_input`

## Attributes

* `field` (`Phoenix.HTML.FormField`) - Defaults to `nil`.
* `id` (`:any`) - Defaults to `nil`.
* `name` (`:any`)
* `value` (`:any`)
* `type` (`:string`) - Defaults to `"text"`. Must be one of `"text"`, `"email"`, `"number"`, `"password"`, `"search"`, `"tel"`, `"url"`, `"date"`, `"time"`, `"datetime-local"`, `"month"`, `"week"`, or `"color"`.
* `variant` (`:atom`) - Defaults to `:subtle`. Must be one of `:subtle`, `:outline`, or `:ghost`.
* `size` (`:atom`) - Defaults to `:sm`. Must be one of `:xs`, `:sm`, `:md`, or `:lg`.
* `errors` (`:list`) - Defaults to `[]`.
* `disabled` (`:boolean`) - Defaults to `false`.
* `class` (`:any`) - Defaults to `nil`.
* Global attributes are accepted. Supports all globals plus: `["autocomplete", "autofocus", "form", "list", "max", "maxlength", "min", "minlength", "pattern", "placeholder", "readonly", "required", "step", "inputmode"]`.

---

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