View Source Phoenix.UI.Components.TextField (Phoenix UI v0.1.9)

Provides text input component.

Link to this section Summary

Functions

Renders text input field component.

Link to this section Functions

Renders text input field component.

examples

Examples

```
<.text_field />
```

attributes

Attributes

  • phx-debounce (:any) - Defaults to "blur".
  • phx-feedback-for (:any)
  • end_icon (:map) - Heroicon-specific attrs to use, such as name. Defaults to nil.
  • errors (:list)
  • extend_class (:string) - Extend existing classes applied to the component.
  • field (:any) - a %Phoenix.HTML.Form{}/field name tuple, for example: {f, :email}.
  • full_width (:boolean) - Defaults to false.
  • helper_text (:string) - Defaults to nil.
  • id (:any)
  • label (:string) - Defaults to nil.
  • margin (:string) - Defaults to "normal".
  • name (:any)
  • start_icon (:map) - Heroicon-specific attrs to use, such as name. Defaults to nil.
  • type (:string) - Defaults to "text".
  • value (:any)
  • variant (:string) - Defaults to "simple".
  • Global attributes are accepted. Supports all globals plus: ["autocomplete", "disabled", "form", "max", "maxlength", "min", "minlength", "pattern", "placeholder", "readonly", "required", "size", "step"].