Docs

Cinder UI

Forms.textarea

Server-rendered

Renders a textarea with shadcn classes.

With FormField

<.textarea field={@form[:bio]} />

With label

<.textarea field={@form[:bio]} label="Bio" />

With explicit errors

<.textarea field={@form[:bio]} label="Bio" errors={["too short"]} />

Inside field composition

<.field>
  <:label><.label for={@form[:bio].id}>Bio</.label></:label>
  <.textarea field={@form[:bio]} />
  <:description>Tell us about yourself.</:description>
</.field>

Basic textarea

  <.textarea id="bio" name="bio" rows={4} />

With placeholder

  <.textarea id="release_notes" name="release_notes" rows={8} placeholder="Summarize what changed in this release..." />

Attributes

Name Type Default Values Global Includes
class :string
errors :list
field {:struct, Phoenix.HTML.FormField}
id :string
label :string
name :string
placeholder :string
rest :global disabled , maxlength , minlength , readonly , required
rows :integer 4
value :string

Slots

No slots declared.