Komponenty
Pole tekstowe
Wielowierszowe pole tekstowe, które rozszerza się wraz z liczbą wierszy.
Użycie
Podstawowy
HTML
<bs:bsui-textarea rows="4" placeholder="Release notes" />Z etykietą
Etykieta u góry, tekst pomocy pod spodem — taki sam układ jak w każdym innym polu.
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>Nieprawidłowy stan
Kolor błędu obejmuje obramowanie pola tekstowego tak samo jak obramowanie pola wprowadzania.
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>Wyłączone
Kontrolka zachowuje tekst zastępczy, ale nie przyjmuje fokusu ani zmian.
HTML
<bs:bsui-textarea rows="3" disabled="true" placeholder="Notes are locked while the release is publishing." />Atrybuty
| Atrybut | Typ | Domyślnie |
|---|---|---|
placeholder | text | — |
rows | number | 4 |
name | text | — |
disabled | toggle | false |
onChange | text | — |
value | text | — |