Komponenten
Textbereich
Ein mehrzeiliges Textfeld, das mit der Zeilenanzahl wächst.
Verwendung
Einfach
HTML
<bs:bsui-textarea rows="4" placeholder="Release notes" />Mit Beschriftung
Beschriftung darüber, Hilfetext darunter – derselbe Aufbau wie bei jedem anderen Feld.
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>Ungültiger Zustand
Die Fehlerfarbe reicht bis zum Rand des Textbereichs, genauso wie bis zum Rand eines Eingabefelds.
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>Deaktiviert
Das Steuerelement behält seinen Platzhalter bei, nimmt aber keinen Fokus und keine Eingaben mehr an.
HTML
<bs:bsui-textarea rows="3" disabled="true" placeholder="Notes are locked while the release is publishing." />Attribute
| Attribut | Typ | Standard |
|---|---|---|
placeholder | text | — |
rows | number | 4 |
name | text | — |
disabled | toggle | false |
onChange | text | — |
value | text | — |