Komponenty
Pole
Obalí jeden ovládací prvok jeho označením, popisom a chybovou správou.
Použitie
Základná
We only use this for receipts.
HTML
<bs:bsui-field>
<bs:bsui-field-label text="Email address" />
<bs:bsui-input type="email" placeholder="you@example.com" />
<bs:bsui-field-description text="We only use this for receipts." />
</bs:bsui-field>Neplatný stav
Označením poľa ako neplatného sa ovládací prvok zafarbí a pod ním sa zobrazí správa.
Enter an address with a domain, like ada@example.com.
HTML
<bs:bsui-field invalid="true">
<bs:bsui-field-label text="Work email" />
<bs:bsui-input type="email" defaultValue="ada@example" />
<bs:bsui-field-error text="Enter an address with a domain, like ada@example.com." />
</bs:bsui-field>Povinné
Požiadavka je vysvetlená v pomocnom texte, takže označenie zostáva krátke.
Required. This name appears on every invoice.
HTML
<bs:bsui-field>
<bs:bsui-field-label text="Workspace name" />
<bs:bsui-input placeholder="Acme Production" required="true" />
<bs:bsui-field-description text="Required. This name appears on every invoice." />
</bs:bsui-field>Zakázané
Vypnite pole aj ovládací prvok v ňom, aby celý riadok pôsobil uzamknuto.
The URL is fixed once the workspace is created.
HTML
<bs:bsui-field disabled="true">
<bs:bsui-field-label text="Workspace URL" />
<bs:bsui-input defaultValue="acme.blockstudio.dev" disabled="true" />
<bs:bsui-field-description text="The URL is fixed once the workspace is created." />
</bs:bsui-field>Pole výberu
Pole obklopuje skupinu ovládacích prvkov rovnako ako jeden vstup.
HTML
<bs:bsui-field invalid="true">
<bs:bsui-field-label text="Deploy target" />
<bs:bsui-radio-group orientation="horizontal">
<bs:bsui-radio value="staging" label="Staging" />
<bs:bsui-radio value="production" label="Production" />
</bs:bsui-radio-group>
<bs:bsui-field-error text="Pick a target before deploying." />
</bs:bsui-field>Štruktúra
Blok Pole sa skladá z nasledujúcich blokov. Každý z nich je samostatný blok, ktorý sa vykresľuje iba vo svojom nadradenom bloku.
bsui/fieldbsui/field-descriptionbsui/field-errorbsui/field-label
Atribúty
| Atribút | Typ | Predvolené |
|---|---|---|
name | text | — |
invalid | toggle | false |
disabled | toggle | false |
bsui/field-description
| Atribút | Typ | Predvolené |
|---|---|---|
text | richtext | — |
bsui/field-error
| Atribút | Typ | Predvolené |
|---|---|---|
text | richtext | — |
bsui/field-label
| Atribút | Typ | Predvolené |
|---|---|---|
text | richtext | — |