View Source DaisyUIComponents.Input (DaisyUIComponents v0.4.3)

Generic Input component

Summary

Functions

Renders a generic input based on type.

Functions

input(assigns)

Renders a generic input based on type.

Examples

<.input type="email" />
<.input name="my-input" type="checkbox" value="false" />

Attributes

  • id (:any) - Defaults to nil.
  • name (:any)
  • label (:string)
  • value (:any)
  • type (:string) - Defaults to "text".
  • color (:string) - Defaults to nil.
  • field (Phoenix.HTML.FormField) - a form field struct retrieved from the form, for example: @form[:email].
  • class (:string) - Defaults to nil.
  • bordered (:boolean) - Defaults to nil.
  • errors (:list) - Defaults to [].
  • checked (:boolean) - the checked flag for checkbox inputs.
  • prompt (:string) - the prompt for select inputs. Defaults to nil.
  • options (:list) - the options to pass to Phoenix.HTML.Form.options_for_select/2.
  • multiple (:boolean) - the multiple flag for select inputs. Defaults to false.
  • Global attributes are accepted. Supports all globals plus: ["autocomplete", "cols", "disabled", "form", "list", "max", "maxlength", "min", "minlength", "pattern", "placeholder", "readonly", "required", "rows", "size", "step"].

Slots

  • inner_block