Pular para o conteúdo

Componentes

Área de texto

Um campo de texto com várias linhas que cresce conforme elas aumentam.

Uso

Básico

HTML
<bs:bsui-textarea rows="4" placeholder="Release notes" />

Com rótulo

Rótulo acima, texto de ajuda abaixo: a mesma estrutura de qualquer outro campo.

Markdown is supported.
HTML
<bs:bsui-field>
  <bs:bsui-field-label text="Release notes" />
  <bs:bsui-textarea name="notes" rows="5" placeholder="What changed in this release?" />
  <bs:bsui-field-description text="Markdown is supported." />
</bs:bsui-field>

Estado inválido

A cor de erro alcança a borda da área de texto da mesma forma que alcança a de um campo de entrada.

Let us know before you cancel.
HTML
<bs:bsui-field invalid="true">
  <bs:bsui-field-label text="Why are you leaving?" />
  <bs:bsui-textarea rows="4" placeholder="Tell us what went wrong." />
  <bs:bsui-field-error text="Let us know before you cancel." />
</bs:bsui-field>

Desativado

O controle mantém o texto de espaço reservado, mas deixa de aceitar foco e edições.

HTML
<bs:bsui-textarea rows="3" disabled="true" placeholder="Notes are locked while the release is publishing." />

Atributos

AtributoTipoPadrão
placeholder text —
rows number 4
name text —
disabled toggle false
onChange text —
value text —