View Source PetalComponents.Input (petal_components v1.2.5)

Renders pure inputs (no label or errors).

Link to this section Summary

Functions

Attributes

  • id (:any) - Defaults to nil.
  • name (:any)
  • label (:string)
  • value (:any)
  • type (:string) - Defaults to "text".
  • field (Phoenix.HTML.FormField) - a form field struct retrieved from the form, for example: @form[:email].
  • 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.
  • class (:string) - the class to add to the input. Defaults to nil. Global attributes are accepted.

Link to this section Functions

attributes

Attributes

  • id (:any) - Defaults to nil.
  • name (:any)
  • label (:string)
  • value (:any)
  • type (:string) - Defaults to "text".
  • field (Phoenix.HTML.FormField) - a form field struct retrieved from the form, for example: @form[:email].
  • 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.
  • class (:string) - the class to add to the input. Defaults to nil. Global attributes are accepted.