View Source SaladUI.Textarea (SaladUI v1.0.0-beta.3)
Implementation of a textarea component for multi-line text input.
Examples:
<.textarea field={f[:description]} placeholder="Type your message here" />
<.textarea rows="6" placeholder="Add your comments" value={@description} />
Summary
Functions
Renders a form textarea.
Functions
Renders a form textarea.
Options
:id
- The id to use for the textarea:name
- The name to use for the textarea:value
- The value to pre-populate the textarea with:field
- A form field struct to build the textarea from:class
- Additional CSS classes to apply:rows
- Number of visible text lines (passed through as rest):placeholder
- Placeholder text (passed through as rest):disabled
- Whether the textarea is disabled (passed through as rest):required
- Whether the textarea is required (passed through as rest)
Attributes
id
(:any
) - Defaults tonil
.name
(:any
) - Defaults tonil
.value
(:any
)field
(Phoenix.HTML.FormField
) - a form field struct retrieved from the form, for example: @form[:email].class
(:any
) - Defaults tonil
.- Global attributes are accepted. Supports all globals plus:
["disabled", "form", "rows", "cols"]
.