Přejít k obsahu

Komponenty

Textové pole

Víceřádkové textové pole, které se zvětšuje podle počtu řádků.

Použití

Základní

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

S popiskem

Popisek nahoře, text nápovědy dole; stejné uspořádání jako u každého jiného pole.

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>

Neplatný stav

Barva chyby se projeví na okraji textové oblasti stejně jako u vstupního pole.

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>

Zakázáno

Ovládací prvek si ponechá zástupný text, ale přestane přijímat fokus i úpravy.

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

Atributy

AtributTypVýchozí
placeholder text —
rows number 4
name text —
disabled toggle false
onChange text —
value text —