DaisyUIComponents.Input (DaisyUIComponents v0.8.5)
View SourceGeneric Input component
Summary
Functions
Renders a generic input based on type.
Functions
Renders a generic input based on type.
Examples
<.input type="email" />
<.input name="my-input" type="checkbox" value="false" />
Attributes
id
(:any
) - Defaults tonil
.name
(:any
)label
(:string
)value
(:any
)type
(:string
) - Defaults to"text"
. Must be one of"checkbox"
,"color"
,"date"
,"datetime-local"
,"email"
,"file"
,"hidden"
,"month"
,"number"
,"password"
,"range"
,"radio"
,"search"
,"select"
,"tel"
,"text"
,"textarea"
,"time"
,"url"
, or"week"
.color
(:string
) - Defaults tonil
.Must be one ofnil
,"primary"
,"secondary"
,"accent"
,"info"
,"success"
,"warning"
, or"error"
.field
(Phoenix.HTML.FormField
) - a form field struct retrieved from the form, for example: @form[:email].class
(:any
) - Defaults tonil
.ghost
(:boolean
) - Defaults tonil
.errors
(:list
) - Defaults to[]
.checked
(:boolean
) - the checked flag for checkbox inputs.prompt
(:string
) - the prompt for select inputs. Defaults tonil
.options
(:list
) - the options to pass to Phoenix.HTML.Form.options_for_select/2.multiple
(:boolean
) - the multiple flag for select inputs. Defaults tofalse
.- 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