Preskočiť na obsah

Komponenty

Textové pole

Viacriadkové textové pole, ktoré sa zväčšuje podľa počtu riadkov.

Použitie

Základná

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

S označením

Označenie navrchu, pomocný text pod ním, rovnaké usporiadanie ako pri každom inom poli.

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

Farba chyby zasahuje okraj textového poľa rovnako ako pri bežnom vstupnom poli.

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ázané

Ovládací prvok si ponechá zástupný text, ale nedá sa naň zamerať ani upravovať.

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

Atribúty

AtribútTypPredvolené
placeholder text —
rows number 4
name text —
disabled toggle false
onChange text —
value text —